How To Remove Website Field From WordPress Comments

0
183

there are many reasons to remove website field from wordpress comments and i’ll touch some of them in detail.

Don't get caught plagiarizing, Test it Free!

removing website field from comment form is beneficial if you want to prevent a large number of spam comments on your site.

along with akismet, there are many spam preventor plugins but none of them can provide you fully protection against the spam comments on your blog.

you always have to follow some tricky methods if you want to control the spam level smartly, and removing website field from comment box is one of the majour fact.

Why they do spam on your blog?

they try to submit spam comments by providing a link to their websites.

if you haven’t sett your comment links as nofollow, they get a backlink for their own site by submiting a random comment on your blog.

since getting backlinks for a website is a majour factor to improve ranking, therefore they follow an easy method to get free backlinks by using your blog as a place to submit spam comments.

some newbi bloggers also unknowingly follow this practice to get backlinks for their blog. who knows what is their intention?

How they submit spam comments

they have alot of ways to submit spam links on your blog, sometimes they make a bot with strong programming skills who tirelessly fill all the fields by providing URLs and keywords for their own websites.

and sometimes they submit spam comments manually,

it’s easy to prevent bots to submit comments by adding a capcha verification in your comment form, but what will you do if someone is submiting comments manually?

How To Remove Website Field From WordPress Comments

there are many ways to remove website field from wordpress comments, but we will discuss the most effective ways in this post.

note: never modify your core files to remove website field from wordpress comments, because whenever the wordpress version will upgrade you will lossed all of your modifications.

there are some other methods to remove website field from wordpress comments which will save your modifications forever.

3 methods to remove website field from wordpress comments

follow these top 3 ways to remove website URL field from comment form.

1.
install plugin

installing a plugin is good choice if you are not comfortable working with codes.

if you want to remove website field from wordpress comments with the use of a wordpress plugin, all is you need to install and activate disable-hide-comment-URL once the plugin is activated, you will see that your website would not display website fieled anymore in comment form.

you don’t have to mess with complex settings or codes.

2.

add code in your functions.php file.

if you are comfortable with coding, you can add a code in your functions.php file to remove website URL field from comment form.

below is the code that you can copy and directly paste in your functions.php.

add_filter( ‘comment_form_defaults’, ‘url_filtered’ );
function url_filtered( $fields ) {
if ( isset( $fields[‘url’] ) )
unset( $fields[‘url’] );
if ( isset( $fields[‘fields’][‘url’] ) )
unset( $fields[‘fields’][‘url’] );
return $fields;
}

3.

Make your own plugin.

if your theme get updates frequently then it’s not recommended to put the code in your functions.php because whenever your theme will get update, you will lose the modification.

in such situation, you can make your own plugin to remove website URL from comment form.

follow the steps below to make a small plugin which will remove website URL.

  1. login to your ftp account.
  2. navigate to the wp-content/plugins
  3. make a new directory and name it “removewebsite”
  4. open the directory “removewebsite”
  5. create a new php file and paste the code as written below.

<?php
/**
* @package removewebsite
Plugin Name: removewebsite
*/
add_filter( ‘comment_form_defaults’, ‘url_filtered’ );
function url_filtered( $fields ) {
if ( isset( $fields[‘url’] ) )
unset( $fields[‘url’] );
if ( isset( $fields[‘fields’][‘url’] ) )
unset( $fields[‘fields’][‘url’] );
return $fields;
}
?>

after that, save it with the .php extention.

now you just need to go to the installed plugins and activate “removewebsite”

that’s it! you have successfully disabled the website URL field for your blog comments.

have you any other recommendations to Remove Website Field From WordPress Comments? please let me know in comments.


Don't miss even a single update, Receive everything in your inbox by providing your email below.

LEAVE A REPLY

Please enter your comment!
Please enter your name here