Remove Website Field from WordPress Comments

The post discusses how people often include their website URLs in comments on WordPress blogs to increase traffic, which can compromise the authenticity of discussions. To counter this, it provides instructions on removing the website field from the WordPress comment form. It instructs users to edit their theme’s function.php file to curtail the practice of…

I believe folks who genuinely have questions or want to leave comments on a blog don’t generally worry about the website URLs on the comment forms on WordPress blogs.

They want to get their comments in, make their point, and hope for a response.

Others have websites and blogs they want to promote, pretend to leave comments, and include their website URLs.

This may be known as a website traffic-building scheme. Going around the web, leaving comments on random blogs but also including their website URLs. Doing this is not the worst thing, but it is not a good reason to fake a comment.

This brief blog post shows students and users how to easily remove the website field from the WordPress comment form on most if not all, WordPress themes. Also, not all commenters who leave comments are fakers, so don’t look at it the wrong way.

I’m just trying to make sure folks leave a genuine comment and not do it for website promotion reasons.

To remove the website field, browse your theme’s functions.php file. You can get there by going to the WordPress admin dashboard and selecting Appearance and Editor.

Then, select the theme to edit and find the file Theme Functions (functions.php)

Place the code below somewhere on the page and save it.

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

Save your changes, and you’re done.

PS: Please back up your site before making the above change. If code isn’t correctly entered in the functions.php file, it may break your site and make it inaccessible.

When you’re done, the form will look like the one below.

Only the form’s name and email address, including the comment section, are required.

Thanks!

Richard Avatar

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *