Customize the profile URL generated by the user_profile_link and user_profile_url template tags

Home / Code Snippets / Customize the profile URL generated by the user_profile_link and user_profile_url template tags

Adjust the profile URL shown in your log to suit your custom setup.

add_filter( 'mycred_users_profile_url', 'mycred_pro_adjust_user_profile_url', 10, 2 );
function mycred_pro_adjust_user_profile_url( $url, $user ) {

	// Adjust the URL
	$url = get_bloginfo( 'url' ) . '/members/' . urlencode( $user->user_login ) . '/';
	return $url;

View entire code

The above code snippet goes into your theme's functions.php file.

Leave a Reply

Spin to win points 💰
Kindly get back to your previous orientation view... your wheel is rolling there...

Do you really like this awesome addon and wanna use on your site? click here to get it now 👍
myCRED Fortune Wheel special offer unlocked!
You have a chance to win free tokens. Are you feeling lucky? Give it a spin.
* You can spin the wheel only once in a month.
* You can spin again any time by paying 500 points
* Once you pay for spin you are not able to refund it.
You must login to play mycred fortune wheel
11
Happy HolidaysGET DISCOUNT