Author Url In comment
-
Is there any way to insert author url in comment? i mean, when any registered user make a comment, His name will be his author url, example, John made a comment, now when anyone clicks to jhon’s name on the comment he will be redirected to john’s author archive on the site? i’ve tried to force with this, but no result,
function force_comment_author_url($comment) { // does the comment have a valid author URL? $no_url = !$comment->comment_author_url || $comment->comment_author_url == 'https://'; if ($comment->user_id && $no_url) { // comment was written by a registered user but with no author URL $comment->comment_author_url = 'https://projuktipata.com/?author=' . $comment->user_id; } return $comment; } add_filter('get_comment', 'force_comment_author_url');
Thanks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Author Url In comment’ is closed to new replies.