Check this Out!Visit our social network pages for recent updates!

Student Tutorial – Remove Website Field from WordPress Comment Form

I have come to believe that 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 just want to get their comments in, make their point and hope for a response.

Now for others have websites and blogs that they want to promote, pretend to leave comments, but also include their website URLs for promotion. This may be known as a website traffic building scheme. Going around web leaving comments on random blogs but also including their website URLs. Doing this is not the worst thing, but not a good reason to fake a comment.

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

I’m just trying to make sure that folks leave real comment and not do it for website promotion reason.

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

wordpress editor

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

Place the below code somewhere in the page and save.

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 make sure to backup your site before making the above change. If code isn’t correctly entered in the functions.php file, it make break your site and make it inaccessible.

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

wordpress comment form url removed

Now only the name and email address are the required available fields on the form, including the comment section.

Thanks!

Leave a Reply