How to Remove URL Field from Comment Form in Astra Theme?

I got a lot of questions “Can I remove the URL field from the comment form in the Astra theme?” I am going to guide you on how to remove URL field from comment Form in Astra Theme.

Astra Theme is one of the most popular WordPress themes and is highly customizable. With all these things, there are a few methods you can remove URL fields from Comment Form in Astra Theme.

And you can remove the website field from the comment form from this WordPress theme easily.

  1. By Using Plugin Method.
  2. Using CSS Code.
  3. Using Code Snippets in functions.php

Methods to Remove URL Field from Comment Form in Astra Theme

We are going to try 3 methods to remove the URL field in Astra WordPress Theme.

How to Remove URL Field from Comment Form in Astra Theme?

1. Use a Plugin

The quickest way to get rid of the website field in the WordPress comment box is to use the plugin method. You can find various plugins to try and get freed from the URL field.

I have created a simple plugin that is hosted on GitHub. You can download the zip file.

  • 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.

Note: This is not an official plugin from Astra Development Team. WPLogout Team creates this plugin to make the whole process easier for you.

2. Adding CSS Code via Customizer

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 Astra 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;

Note: This is not an efficient method but it will easily hide the URL field from the comment section.

3. Add Code Snippets in functions.php

In this method, we are going to use the Code Snippets plugin to add PHP code directly to functions.php without any child theme.

Remove URL Field From Comment form in Astra Theme

Here is the process to remove the comment URL Box in Astra WordPress Theme.

  1. Go to Dashboard > Plugins > Add New
  2. Search Code Snippets > Install Now > Activate
  3. After installing the plugin, Go to Snippets > Add New
  4. Add a Snippet Title as “Remove URL Field From Comment form in Astra Theme“.
  5. Copy and Paste the following Removal code.
  6. Hit Activate Button.
  7. Finally, see the result without logging on to your website.
add_filter( 'astra_comment_form_default_fields_markup', 'wplogout_remove_comment_website_field', 20 );

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

4. Result

Here is the result where you can see the website field is removed from the comment section. Though the adding website is optional if you are receiving lots of spam comments then it’s a wise decision.

Astra Theme Website Box removed from Comment Section

Related Astra Tutorials

At the End

If you are using Astra Theme and want to remove URL Field from Comment Form, then you use this tutorial.

After reading the article and doing the trick, you can easily remove the URL field away from the comment section.

So, which of the above 3 methods are you going to use?

My favorite method is using code snippets i.e. following method 3 but it’s up to you to use any one of them.

Let me know in the comment section.


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

8 thoughts on “How to Remove URL Field from Comment Form in Astra Theme?”

  1. I’m using Astra child theme and for some reason the code snippets plugin didn’t modify the functions.php

    However when I tried your code directly inside the functions.php file it WORKED

    NB: Before trying any codes directly in the functions.php, first dowload the file on your computer, so you have a backup in case something goes wrong

  2. Great, but one more, how to edit – “Save my name, email, and website in this browser for the next time I comment.”

    Above line.
    I want to set – Save my name and email, in this browser for the next time I comment.


Leave a Comment