When the author replies to comments, the author’s name links to the home page

[ad_1]

function use_author_link_as_comment_author_url( $url, $id, $comment ) {
    if ( $comment->user_id ) {
        return get_author_posts_url( $comment->user_id );
    }
    return $url;
}
add_filter( 'get_comment_author_url', 'use_author_link_as_comment_author_url', 10, 3 );

Can you please try above given code on functions.php file? I hope this will solve your issue.

Thread Starter
Robin

(@nioriaa)

@devmuhib Thanks for sharing it.

It is working.

  • This reply was modified 4 hours, 14 minutes ago by Robin.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer