Removing URL Field from the WordPress Comments Form

If you do not want to show the URL field in your comment form then you can easily hide it from your visitor. In this post, you can find a simple snippet that will show you how to remove the URL Field from your WordPress Comments form without modifying it.

Open your functions.php file and insert this function:

function theme_slug_remove_comment_fields($fields) {
  unset($fields['url']);
  return $fields;
}
add_filter('comment_form_default_fields', 'theme_slug_remove_comment_fields');
Posted in Tips, WordPress

Taras Dashkevych

More Posts by Taras
Taras Dashkevych is a founder of Themes Harbor. He specializes in creating simple, elegant, and powerful website designs. His passion for design can be seen through the clean lines and inspired themes that he creates for people all around the world. Connect with him @TarasDashkevych.

Leave a Reply

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