2

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

supap
  • 89
  • 9

2 Answers2

3

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!

Nabeel Khan
  • 3,715
  • 2
  • 24
  • 37
ScyGeek
  • 115
  • 6
0

You have to go to:

genesis > lib > structure > comments.php

And find the following line:

if ( ! empty( $url ) && 'http://' !== $url ) {$author = sprintf( '%s', esc_url( $url ), genesis_attr( 'comment-author-link' ), $author );}

And replace it with this new:

if ( ! empty( $url ) && 'http://' !== $url ) {$author = sprintf($author );}
ScyGeek
  • 115
  • 6
  • i think it's a different thing. I update my answer with more specific information. thank you ScyGeek – supap Apr 12 '17 at 16:34
  • wow it works!!! But in this way, if in future i update genesis, it returns back on default state. There is a way to implement in other ways? :) – supap Apr 12 '17 at 18:49