I can't manage to disable the URL of only the author's post. Here's an example : My website
As you can see, the green link is mine (the author of the post). I only want to remove that link, not other comments links.
How can I do this? I have tried altering this bit of code in functions.php, but it didn't do what I want (it's removing everyone URL, not just mine):
add_filter( 'get_comment_author_link', 'rv_remove_comment_author_link', 10, 3 );
function rv_remove_comment_author_link( $url, $author, $comment_ID ) {
return $author;
}
Thanks for your help.
I can't manage to disable the URL of only the author's post. Here's an example : My website
As you can see, the green link is mine (the author of the post). I only want to remove that link, not other comments links.
How can I do this? I have tried altering this bit of code in functions.php, but it didn't do what I want (it's removing everyone URL, not just mine):
add_filter( 'get_comment_author_link', 'rv_remove_comment_author_link', 10, 3 );
function rv_remove_comment_author_link( $url, $author, $comment_ID ) {
return $author;
}
Thanks for your help.
Share Improve this question edited Sep 27, 2019 at 15:47 butlerblog 5,1213 gold badges28 silver badges44 bronze badges asked Sep 27, 2019 at 14:22 AdamBAdamB 1 1- Perhaps you can do that using CSS display:none. I can take a look, send us a link to one of the posts please. – MistaPrime Commented Sep 27, 2019 at 15:36
2 Answers
Reset to default 0Wordpress have "get_comment_author_url" function to retrieve the url of the author of the current comment.
you can set it to blank using this
function remove_author_url( $url, $id, $commentr ) {
return "";
}
add_filter( 'get_comment_author_url', 'remove_author_url', 10, 3);
aslam shikalgar you misunderstood. I don't want to get all authors of comment blank. Only the author of the post which he's commenting.