27 March 2013
Comments: Comments Off on How To Remove The URL Field From WordPress Comments

How To Remove The URL Field From WordPress Comments

Cut the URL field out of the WordPress comment form

There are some WordPress sites where you may not want to include the URL field in the comment form. It’s not always necessary and spammers tend to use it to link to their spammy websites, which will be posted in your comments if you have auto approval turned on. Just to be safe, you may want to remove that URL field altogether.

Here’s a quick snippet I found the other day while browsing WPSNIPP.com. You can add the code below to your theme’s functions.php file or create a quick functionality plugin for it – your choice.

add_filter('comment_form_default_fields', 'unset_url_field');
function unset_url_field($fields){
       return $fields;

Pretty simple, right? Use this same formula for removing any of the other comment fields from the form. This is assuming that you’re using the default WordPress comment form. If you’re using a plugin, there may be an even easier way to remove that field within the form building settings.

photo credit: photobunny via photopin cc

Related posts:

  1. How to Move a BuddyPress Profile Field to a New Group Adding and moving BuddyPress fields was made to be intuitive….
  2. Coming Soon in BuddyPress 1.6: Profile Field Privacy Options Basic profile privacy is coming to BuddyPress. Find out more…
  3. How to Remove the Comments Count Column From WordPress Pages Who needs a comment count column for pages? Let’s turn…

Comments are closed.