Home » Web Design » How To Remove The Website URL Option From WordPress Comments
Remove Website URL Option In WordPress Comments

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) {
    unset($fields['url']);
    return $fields;
}
add_filter('comment_form_default_fields','remove_comment_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

Jared Harrison

Jared Harrison is an accomplished tech author and entrepreneur, bringing forth over 20 years of extensive expertise in cybersecurity, privacy, malware, Google Analytics, online marketing, and various other tech domains. He has made significant contributions to the industry and has been featured in multiple esteemed publications. Jared is widely recognized for his keen intellect and innovative insights, earning him a reputation as a respected figure in the tech community.

More Reading

Post navigation

2 Comments

  • Hi sir thank you for sharing this information, I have been remove website option in my wordpress website ?and thanks to you for helping me

  • Hi! Thank you so much for this information as this is the problem that I was constantly encountering. Thanks!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

How To Login To WordPress With An Email Address (Enabling Email Addresses)

How to fix This webpage has a redirect loop error on WordPress

How To Hide Or Remove WordPress Page And Post Titles With CSS