phpwordpresscommentsgenesis

Remove comment author link wordpress


i have Genesis Magazine Pro Theme and i want to delete comment author link.

I use many different guide:

http://wpsquare.com/remove-comment-author-website-link-wordpress/

https://www.engagewp.com/remove-wordpress-comment-author-link/

I add some code in functions.php, but these method doesn't work

I have still remove the field link when someone post a comment, but now i want to remove the comment author link.

How to resolve it?

For example, i want to remove the link on "Mr Wordpress".

enter image description here Thanks


Solution

  • In case that you don't want to do it directly on Genesis, you can paste this filter at the end of your theme functions.php file:

    function filter_get_comment_author_url( $url, $id, $comment ) {
        return "";
    }
    add_filter( 'get_comment_author_url', 'filter_get_comment_author_url', 10, 3);
    

    Enjoy!