Join WPLogout Community on Facebook Join Now

How To Remove URL Field From Comment form in GeneratePress?

Many of us are using GeneratePress Theme as it is one of the most popular WordPress themes which is highly customizable. With all the things, what if you are thinking to Remove URL Field From Comment form in GeneratePress Theme.

Yes, you can remove the website field from comment form in WordPress easily. We are going to try 3 methods to remove the URL field in GeneratePress WordPress Theme.

  1. By Using Plugin Method.
  2. Using CSS Code.
  3. Using Code Snippets in functions.php
How To Remove URL Field From Comment Form in GeneratePress WordPress Theme?

Why Remove URL Field From Comment form in GeneratePress Theme?

There are a few reasons to remove the URL field in WordPress. The main reason is to get rid of spam on WordPress websites. Many of us get heavy spam comments on our website and we want to avoid it. The only solution to prevent spam comments is by removing the URL field on our site.

Spam Comments in WordPress with links
Example of Spam Comments on WordPress Website

Spammers are using automated bots to post comments with their website links. The main purpose is to get backlinks from our site. so, to avoid the automated bot comments, you can get rid of the website field from GeneratePress Comment Box.

Continue Reading: GeneratePress Review

Methods to Remove Website Field from Comment form

No URL Field in GeneratePress Comment Form

The quickest way to get rid of the website field in WordPress comment box is to use the plugin method. You can find various plugins to try and get freed from the URL field. Also, we are going to use code snippets in functions.php method, and a child theme method to remove the website box.

How To Remove URL Field From Comment form in GeneratePress Theme? - GeneratePress Tutorial

1. By using Remove URL Field Plugin

Adding a plugin is the simplest method to hide or remove the URL Field in WordPress Comment box.

I have tested different plugins available in the WordPress repository but none of them were working in GeneratePress Theme. so, I decided to create a simple plugin to Remove URL Field from Comment form.

Within WordPress

  1. Visit ‘Plugins > Add New’
  2. Search ‘Remove URL Field from Comment Form in GeneratePress Theme’
  3. Install and Activate the plugin.

Manual Way

Download and install the plugin. The plugin works both in the Free and Premium version of GeneratePress Theme.

  • Download the plugin using the above link.
  • Go to Plugins > Add New.
  • Click on the Upload Plugin.
  • Browse and Activate the plugin.
  • Finally, See the changes in the comment box.

2. Using CSS Code

The CSS method is another simplest method to hide the URL field from your WordPress website.

Use the following CSS code in the Customizer section of GP Theme.

CSS Method  to Remove Website Field in GeneratePress
  • Go to Appearance > Customize > Additional CSS.
  • Copy and Paste the following Code.
  • Hit Publish Button.
.comment-form #url{
	display:none;
}

3. Using Code Snippets in functions.php

In this method, we are going to use the Code Snippets plugin that helps to enter code directly to functions.php without any child theme. so here is the process to delete the comment URL Box in GeneratePress Theme.

Code Snippet to Remove URL field in GeneratePress
  1. Go to Plugins > Add New
  2. Search Code Snippets > Install Now > Activate
  3. After installing, Go to Snippets > Add New
  4. Add a Snippet Title.
  5. Copy and Paste the following Remove URL code.
  6. Hit Activate Button.
add_action( 'after_setup_theme', 'tu_add_comment_url_filter' );
function tu_add_comment_url_filter() {
    add_filter( 'comment_form_default_fields', 'tu_disable_comment_url', 20 );
}

function tu_disable_comment_url($fields) {
    unset($fields['url']);
    return $fields;
}

Wrapping Up

I hope this tutorials helps to Remove URL Field From Comment form in GeneratePress Theme.

Among the three solutions, I recommend you going with the 1st and 3rd option i.e. Using Plugin & Code Snippets method to get rid of the website field.

Though using the plugin and CSS code is easy, you can also try the Code Snippet method.

If you have any comments then feel free to drop below. Thank You.

Share:

GET 100+ FREE SEO TOOLS

Quickly access over 100+ popular SEO/Marketing tools to Boost your website traffic.

Thank you for subscribing. Check your Email(Didn't receive? check Spam Folder)

Something went wrong.

I am obsessed with WordPress and write articles about WordPress Speed Optimization, SEO, Blogging. I mostly publish tutorials on GeneratePress and GenerateBlocks.

8 thoughts on “How To Remove URL Field From Comment form in GeneratePress?”

  1. Hello man,

    Your articles are simply superbbb…Liked it so much 🙂

    How to create a header and footer design like your site. I tried many customisations but I am not able to create the one which looks like yours. I am one of the followers on YouTube. Please make a video or write a tutorial please. Eagerly waiting. Stay blessed 🙌

    Reply
    • You can do it easily. Go to your comments section. Go to screen options > Set Number of items per page to your desire number and select all the comments and delete all the comments at once.
      Thanks

      Reply

Leave a Comment