Monday 7 October 2013

How To Remove URL Field From WordPress Comment Form

Important: All scripts hosted on widcraft.googlecode.com don't work anymore because Google has blocked that SVN repository.
For some WordPress sites, such as themes, review, and all, you may want to remove Website URL field from the WordPress' comment form. Removing the field could be used for product reviews or if they created a support tickets theme that does not require a url field.

It's not much hard to remove/unset the website url from the comment form. Just add following snippet to your functions.php file and it's done:

add_filter('comment_form_default_fields', 'unset_url_field');
function unset_url_field($fields){
    if(isset($fields['url']))
       unset($fields['url']);
       return $fields;
}
Important: Check our new website TricksPanda.com for WordPress tutorials, plugins and more.
 
Powered by Blogger.