Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk2 min

How to Remove the Website URL Field From the WordPress Comment Form

Use WordPress’s comment_form_default_fields filter to remove the default Website URL input from the standard comment form.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To remove the Website field from WordPress’s standard comment form, unset the url entry with the comment_form_default_fields filter. Add the snippet to a site-specific plugin or a child theme’s functions.php; it removes the field from the default form rather than merely hiding it with CSS.

Remove the URL field with a WordPress filter

WordPress’s comment_form() reference documents comment_form_default_fields as a way to add or remove individual default fields. The website input is stored under the url key, so unsetting that key removes it from the default fields array.

As an Amazon Associate I earn from qualifying purchases.

function site_remove_comment_url_field( $fields ) {
    unset( $fields['url'] );
    return $fields;
}
add_filter( 'comment_form_default_fields', 'site_remove_comment_url_field' );

Replace site_remove_comment_url_field with a different function name if your site already uses that name. Put the code in a site-specific plugin or your active child theme’s functions.php. A child theme helps keep the change when the parent theme is updated; editing a parent theme directly risks losing the change in an update. WordPress Core Trac also identifies a plugin as an alternative route: ticket #47926.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Confirm the change and identify exceptions

Reload a page that displays the standard WordPress comment form and check that the Website field is gone. If it remains, the theme may be building a custom form or a plugin may be adding the field. The standard hook affects the default fields used by comment_form(); it cannot be assumed to control a separately constructed form.

The broader comment_form_fields hook filters comment form fields that include the comment textarea. For this specific default URL-field change, use the narrower default-fields filter unless you need to modify the full rendered field set.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When to use CSS or a theme setting instead

Method What it changes Best fit
PHP filter Removes the url entry from the default fields array used by the standard form. When you want the default WordPress form not to generate the Website field.
CSS Hides the field visually; it does not remove the field from the PHP array. As a display-level workaround when PHP changes are not suitable. A WordPress.org support reply uses #respond .comment-form-url, but test the selector with your theme because markup can vary: support discussion.
Theme or plugin setting Depends on the feature provided by the installed theme or plugin. When your installed product offers a relevant setting; its availability depends on the product and version.

For custom form layouts, comment_form() also accepts a fields array, so a theme template can provide its own field list. The comment_form_defaults reference documents a separate filter for the default arguments passed to the form function; it is not the narrow filter for removing the default URL entry.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.