0
hello8
Hi. Love the profile plugin. Whichever user is logged in can access their profile by clicking on the page link in menu. But when other users click on the author of a post it does not take them to the authors profile. Have tried changing code in function.php
add_filter( 'author_link', 'change_author_link', 10, 1 );
function change_author_link($link) {
$username=get_the_author_meta('user_nicename');
$link = 'http://ellie-mae.com/buzz/profile' . $username;
return $link;
}
Also tried changing 'username' to 'id' but still no luck.
Any idea how i can get the 'author' linked to their profile please?
Many thanks
2 Subscribers


Submit Answer
1 Answers
Best Answer
0

Welcome to our forum.
Can you please try following code and let me know the result.
add_filter( 'author_link', 'change_author_link', 10, 1 ); function change_author_link($link) { $userID =get_the_author_meta('ID'); $link = 'http://ellie-mae.com/buzz/profile?id=' . $userID ; return $link; }
Regards
Glad to know that its work. if you love the plugin and our support please submit us five star reviews.
https://wordpress.org/plugins/user-profile/#reviews
Regards