Remove comment author link from WordPress helps keep comments form your blog cleaning from spam links left by automated or manual comment spammers without install plugin.
WordPress comments feature allows commenters can add a link to own website. It’s good for those who want to discuss seriously, they deserve backlinks for their websites. But this feature is often misused by spammers to promote their blog or product through spam comments.
This tutorial will help you Remove Comment Author Website Link in WordPress, please follow the steps below:
Open functions.php file in themes folder and add the following code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
function mytheme_comment( $comment , $args , $depth ) { $GLOBALS [ 'comment' ] = $comment ; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
|
If function mytheme_comment already exist in functions.php file, you can find find and replace
1
|
comment_author_link() |
with
1
|
comment_author() |
Next: Open comments.php file in themes folder, find and replace function:
1
|
wp_list_comments(); |
with
1
|
wp_list_comments( 'callback=mytheme_comment' ); |
If this is too difficult for you to do, there simply is install plugin Disable Author Url and Comment Links