Pages Menu
Categories Menu

Posted by on Jul 10, 2013 in Blog, Tips & Tricks | 6 comments

Removing the URL field from the WordPress comments form

Removing the URL field from the WordPress comments form

WordPress started as just a blogging platform in 2003 and is now used as a content management system to host millions of websites around the world.

By default WordPress allows the user to leave a web address when they post a comment. It’s this web address many spammers use to create inbound links to their websites.

By adding a few lines of code this can be prevented.

  1. Login to the WordPress dashboard
  2. Choose appearance > Editor
  3. Open functions.php and paste the code below at the end of the file.

function remove_comment_fields($fields) {
return $fields;

Now the Url field won’t be displayed (see below)

Wordpress comments form with URL field removed

WordPress comments form with URL field removed

WordPress links

Google’s mobile friendly algorithm rewards responsive sites
How social media can benefit small business
Why WordPress makes for a great content management system
How to password protect your WordPress site
How to disable comments on your WordPress site
How to add comments to your WordPress posts
Removing the URL field from the WordPress comments form
How to Import a Microsoft Word Document into WordPress



  1. Amazing blog! Is your theme custom made or did you download it
    from somewhere? A design like yours with a few simple
    tweeks would really make my blog shine. Please let me know where you got your design.

    • The name of the theme is Trim and it’s from a company called Elegant Themes. They charge a yearly fee for the themes but if your a small company developing multiple sites its a great resource.

  2. Oh it’s really easy:) I was thinking that i need a plugin to do that. Thank’s!

    • Thanks Mikrodermabrazja. I’m glad to help.

  3. Hi there would you mind letting me know which
    hosting company you’re utilizing? I’ve loaded your blog in 3
    completely different web browsers and I must say this
    blog loads a lot faster then most. Can you recommend a
    good internet hosting provider at a honest price?
    Many thanks, I appreciate it!

  4. It’s always good to use a fast hosting provider and one local to your country. My site is hosted with CWCS managed hosting over in England. They are not cheap but they do provide a great service. If you require a quick fix perhaps try using a caching plugin like W3 Total Cache. Let me know how you get on?