How to Disable / Remove Website URL Field from WordPress Comments

Every WordPress Comment Box contains total 4 fields by default and those are Name, Email, Website URL and Comment area. You must notice that after opening your WordPress Admin dashboard, you get many notifications of SPAM comments blocked by Akismet. Akismet is a comment spam filtering and in the previous topic we discussed What is Akismet and how to setup Akismet plugin for WordPress. There are several ways to stop spam comments. But handling  lot of SPAM comments is not easy job. You have to spend time for this. So you must thinking, What i I remove Website URL from WordPress comment section?

Right? And the answer is YES. You can Disable / Remove website field from WordPress. In this tutorial I am sharing How you can remove website URL from WordPress comments. 

Should you  remove website URL from WordPresscomments??

Well, it depends.

Most of users try to link their website to your website. So this way they get backlinks for SEO purpose. But most of comments are Spammy and also hurts your SEO. They never leaves legit comments, but replies with some torrent, download, crack link sites. It’s very weird, right? So you can remove website URL field from WordPress comments.

How to Disable / Remove Website URL from WordPress Comments

There are number of ways to remove URL field from WordPress comment form.

Method 1

Removing ‘url’ => line from comment-template.php

It is one of the easiest ways to do this process. Before doing , you must need to take a backup of that file.

Go to your cPanel & your WordPress directory. Then go to wp-includes, and find comment-templete.php file. Now open the file in Notepad or Notepad+(recommended) and search that line that contains :

  Before

$fields = array(
'author' =>
'<p class="comment-form-author"><label for="author">' . __( 'Name', 'domainreference' ) . '</label> ' .
( $req ? '<span class="required">*</span>' : '' ) .
'<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) .
'" size="30"' . $aria_req . ' /></p>',
'email' =>
'<p class="comment-form-email"><label for="email">' . __( 'Email', 'domainreference' ) . '</label> ' .
( $req ? '<span class="required">*</span>' : '' ) .
'<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) .
'" size="30"' . $aria_req . ' /></p>',
'url' =>
'<p class="comment-form-url"><label for="url">' . __( 'Website', 'domainreference' ) . '</label>' .
'<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) .
'" size="30" /></p>',
);

When you get the line, simply remove the total ‘url’ => line and it will look like this.

After

$fields = array(
'author' =>
'<p class="comment-form-author"><label for="author">' . __( 'Name', 'domainreference' ) . '</label> ' .
( $req ? '<span class="required">*</span>' : '' ) .
'<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) .
'" size="30"' . $aria_req . ' /></p>',
'email' =>
'<p class="comment-form-email"><label for="email">' . __( 'Email', 'domainreference' ) . '</label> ' .
( $req ? '<span class="required">*</span>' : '' ) .
'<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) .
'" size="30"' . $aria_req . ' /></p>',
);

Now refresh the comment section and you will see there is no website URL field.

 

# Method 2

Add the following code to theme’s functions.php file.

Go to WordPress directory. Then go to wp-includes, and find functions.php file. Then just add the following lines in functions.php. 

function crunchify_disable_comment_url($fields) {
unset($fields['url']);
return $fields;
}
add_filter('comment_form_default_fields','crunchify_disable_comment_url');

 

# Method 3

Using Plugin

remove website url

This is the easiest method to remove website URL. If you don’t want to edit codes, then it is the best option for you. Download the plugin and activate it. Then after page refreshing you will see website URL field is missing.

*This post may have affiliate links, which means I may receive a small fee if you choose to purchase through my links (at no extra cost to you). This helps us to keep WPMyWeb up and running and up-to-date. Thank you if you use our links, we really appreciate it! Learn more.

Sharing is Caring
Jyoti Ray
 

Jyoti Ray is the founder of WPMyWeb.com. He writes about Blogging, WordPress tutorials, Hosting, Affiliate marketing etc. He mostly spends times on blogging, reading books and cooking.

Glastrennwände
blumen verschicken Blumenversand
blumen verschicken Blumenversand
Reinigungsservice Reinigungsservice Berlin
küchenrenovierung küchenfronten renovieren küchenfront erneuern