How To Remove The Website URL Option From WordPress Comments

By default WordPress (with exceptions) gives visitors the option to leave a URL or their “website” when leaving comments.

Website In WordPress Comments

In some cases the “website” option in WordPress comments is not necessarily practical. Especially if you prefer for no one to leave third party URLs which can potentially harm your WordPress website. Luckily there’s a simple PHP snippet that will remove the website URL field from WordPress comments.

Copy and paste the PHP snippet below to your functions.php file.

function remove_comment_fields($fields) {
    return $fields;

Depending on the style of your WordPress theme, your comment section will now appear similar to the image below; only showing the options for visitors to leave their name, email address, and comment.

Remove Website URL Option In WordPress Comments

Sean Doyle

Sean Doyle is an engineer from Los Angeles, California. Sean's primary focuses include Internet Security, Web Spam, and Online Marketing.

Comment ( 1 )

  1. ReplyCorporate catering san francisco
    Hi! Thank you so much for this information as this is the problem that I was constantly encountering. Thanks!