Disable Search

설명

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

  • Prevents the search form from appearing if the theme uses the standard get_search_form() function to display the search form.
  • Prevents the search form from appearing if the theme uses a searchform.php template
  • Prevents the search item from appearing in the admin tool bar when shown on the front-end.
  • Disables the search widget.
    • Removes the Search widget from the list of available widgets
    • Deactivates any search widgets currently in use in any sidebars (they are hidden, not deleted; they’ll still be in the proper locations if this plugin gets deactivated)
  • With or without the search form, the plugin prevents any direct or manual requests by visitors, via either GET or POST requests, from actually returning any search results.
  • Submitted attempts at a search will be given 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 plugin.

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

Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage

설치

  1. Install via the built-in WordPress plugin installer. Or download and unzip disable-search.zip inside the plugins directory for your site (typically wp-content/plugins/)
  2. Activate the plugin through the ‘Plugins’ admin menu in WordPress

FAQ

Will this disable the search capabilities in the admin section of the blog?

No.

Will this prevent Google and other search engines from searching my site?

No. This only disables WordPress’s capabilities with regards to search.

Why do I still see a search form on my site despite having activated this plugin?

The most likely cause for this is a theme that has the markup for the search form hardcoded into one or more of the theme’s template files (excluding searchform.php). This is generally frowned upon nowadays (the theme should be calling get_search_form() or using searchform.php to get the search form). There is no way for this plugin to prevent this hardcoded form from being displayed.

However, even if this is the case, the form won’t work (thanks to this plugin), but it will still be displayed.

Is this plugin GDPR-compliant?

Yes. This plugin does not collect, store, or disseminate any information from any users or site visitors.

Does this plugin include unit tests?

Yes.

후기

2017년 January 15일
Very useful for certain type of websites! Is it ok for WP 4.7 and after?
모든 10 평가 읽기

기여자 & 개발자

“Disable Search”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

“Disable Search”(이)가 3(으)로 번역되었습니다. 기여해 주셔서 번역자님께 감사드립니다.

자국어로 “Disable Search”(을)를 번역하십시오.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하십시오.

변경이력

1.8 (2020-06-02)

  • New: Disable output of SearchAction in SEO schema by Yoast SEO. Props @galengidman.
  • New: Add TODO.md and move existing TODO list from top of main plugin file into it (and add to it)
  • Change: Use HTTPS for link to WP SVN repository in bin script for configuring unit tests
  • Change: Note compatibility through WP 5.4+
  • Change: Update links to coffee2code.com to be HTTPS
  • Unit tests:
    • New: Add tests for hooking actions and filters
    • New: Add test for backend searches not being affected
    • Change: Remove unnecessary unregistering of hooks and thusly delete tearDown()

1.7.2 (2019-12-12)

  • Change: Note compatibility through WP 5.3+
  • Change: Unit tests: Change method signature of assertQueryTrue() to match parent’s update to use the spread operator
  • Change: Update copyright date (2020)

1.7.1 (2019-06-17)

  • Unit tests:
    • Change: Update unit test install script and bootstrap to use latest WP unit test repo
    • New: Test that the plugin hooks plugins_loaded for initialization
  • Change: Note compatibility through WP 5.2+
  • Change: Add link to CHANGELOG.md in README.md

Full changelog is available in CHANGELOG.md.