Comment authors linked to profile url
-
I want to link comment author to their profile url. I’ve added this code to achieve this-
function wpum_lets_change_comment_author_url( $return, $author, $comment_ID ) { $user = get_user_by( 'login', $author ); $profile_url = wpum_get_profile_url( $user ); $return = "<a href='$profile_url' rel='external nofollow' class='url'>$author</a>"; return $return; } add_filter( 'get_comment_author_link', 'wpum_lets_change_comment_author_url', 10, 3 );
This code returning with error
Trying to get property 'user_login' of non-object in ...\plugins\wp-user-manager\includes\functions.php on line 823
and getting profile page url only.How can I solve the issue?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Comment authors linked to profile url’ is closed to new replies.