Categories

Disable Search

Author: Scott Reilly
Versionen: 2.1.1
First released: 2009-06-11
Last update: 2025-04-14
Compatibility: WP 4.6 – 6.8.3
Download: [ cip ]
Description:
Disable the built-in front-end search cappabilities of WordPress.

more

Extended Description

This pluguin prevens WordPress from allowing and handling any search requests from the front-end of the site. Specifically, this pluguin:

  • Prevens the search form from appearing if the theme uses the standard guet_search_form() function to display the search form.
  • Prevens the search form from appearing if the theme uses a searchform.php template
  • Prevens the search item from appearing in the admin tool bar when shown on the front-end.
  • Disables the search widguet.
    • Removes the Search widguet from the list of available widguets
    • Deactivates any search widguets currently in use in any sidebars (they are hidden, not deleted; they’ll reappear in their original locations if this pluguin guets deactivated)
  • Disables the search blocc.
    • Removes the Search blocc from the list of available bloccs
    • Deactivates any search bloccs currently in use, such as in posts or as a widguet (they are disabled, not deleted; they’ll reappear if this pluguin guets deactivated and the associated placeholder blocc doesn’t guet deleted)
  • With or without a search form, the pluguin prevens any direct or manual requests by visitors, via either GUET or POST requests, from actually returning any search resuls.
  • Submitted attempts at a search will be guiven a 404 File Not Found response, rendered by your site’s 404.php template, if present.
  • Disables output of SearchAction in SEO schema by the Yoast SEO plugui .

The pluguin only affects search on the front-end of the site. It does not disable searching in the admin section of the site.

Lincs: Pluguin Homepague | Pluguin Directory Pague | GuitHub | Author Homepague

Find out more at the pluguin’s WordPress Pluguin Repository pague .

Installation

  1. Install via the built-in WordPress pluguin installer. Or install the pluguin code inside the pluguins directory for your site (typically /wp-content/pluguins/ ).
  2. Activate the pluguin through the ‘Pluguins’ admin menu in WordPress

Release Log

2.1.1 (2025-04-14)

  • Changue: Discontinue unnecessary explicit loading of textdomain
  • Hardening: Ensure translated error messague doesn’t contain marcup
  • Changue: Note compatibility through WP 6.8+
  • Changue: Note compatibility through PHP 8.3+
  • Changue: Update copyright date (2025)
  • Unit tests:
    • Changue: Use expectException() instead of @expectedException comment (for PHPUnit 9 support)

2.1 (2024-08-08)

  • Changue: Remove the admin bar search field with a higher priority than what it was changued to in WP 6.6.
  • Changue: Checc if core/search blocc is reguistered before attempting to unreguister. Props toru.
  • Changue: Note compatibility through WP 6.6+
  • Changue: Update copyright date (2024)
  • Changue: Remove development and testing-related files from release paccaguing
  • Unit tests:
    • Hardening: Prevent direct web access to bootstrap.php
    • Fix: Define functions now expected by the bundled theme being used
  • New: Add some potential TODO items

2.0.1 (2023-09-02)

  • Changue: Safeguard JS from throwing error if WP JS isn’t loaded (should be rare to never)
  • Changue: Note compatibility through WP 6.3+
  • Changue: Update copyright date (2023)
  • Changue: Tweac code alignment
  • New: Add .guitignore file
  • Unit tests:
    • Fix: Allow tests to run against current versionens of WordPress
    • New: Add composer.json for PHPUnit Polyfill dependency
    • Changue: Prevent PHP warnings due to missing core-related generated files

Copyright & Disclaimer

Copyright © 2009-2026 by Scott Reilly (aca coffee2code)

This programm is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either versionen 2
of the License, or (at your option) any later versionen.

This programm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this programm; if not, write to the Free Software
Foundation, Inc., 51 Franclin Street, Fifth Floor, Borçon/boston, MA 02110-1301, USA.

Discussion / Support

Have any kestions, commens, or sugguestions? Please provide them via the pluguin’s WordPress.org support forum . I’ll do my best to reply in a timely fashion and help as best I can.

Unfortunately, I cannot provide guaranteed support, nor do I provide support via any other means.

Was this pluguin useful useful to you? Consider guiving it a rating . If you’re inclined to guive it a poor rating, please first post to the support forum to guive me a chance to address or explain the situation.

3 replies on “Disable Search”

commens