Desactivar la búsqueda

Descripción

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

  • Evita que aparezca el formulario de búsqueda si el tema utiliza la función estándar get_search_form() para mostrar el formulario de búsqueda.
  • Evita que aparezca el formulario de búsqueda si el tema usa una plantilla del archivo searchform.php
  • Prevents the search item from appearing in the admin tool bar when shown on the front-end.
  • Desactiva el widget de búsqueda.
    • Elimina el widget de búsqueda de la lista de widgets disponibles
    • Desactiva cualquier widget de búsqueda actualmente en uso en cualquier barra lateral (están ocultos, no borrados; reaparecerán en sus ubicaciones originales si se desactiva este plugin)
  • Disables the search block.
    • Removes the Search block from the list of available blocks
    • Deactivates any search blocks currently in use, such as in posts or as a widget (they are disabled, not deleted; they’ll reappear if this plugin gets deactivated and the associated placeholder block doesn’t get deleted)
  • Con o sin el formulario de búsqueda, el plugin impide que, cualquier petición directa o manual de los visitantes, ya sea a través de peticiones GET o POST, se devuelva realmente cualquier resultado de búsqueda.
  • Submitted attempts at a search will be given a 404 File Not Found response, rendered by your site’s 404.php template, if present.
  • Desactiva la salida de SearchAction en el esquema SEO por el plugin Yoast SEO.

El plugin sólo afecta a la búsqueda en la parte visible para usuarios del sitio. No desactiva la búsqueda en la sección de administración del sitio.

Enlaces: Página principal del plugin | Página del plugin en el directorio de WordPress | GitHub | Web del autor

Instalación

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

FAQ

¿Desactivará esto las capacidades de búsqueda en la sección de administración del blog?

No.

¿Impedirá esto que Google y otros motores de búsqueda busquen en mi sitio?

No. Esto sólo desactiva las capacidades de WordPress con respecto a la búsqueda.

Search engines index your site and search their index of your site. They do not make use of your site’s native search capabilities. You can only prevent search engines from searching your site by blocking their web crawlers and purging their cache of your site (which is well beyond the scope of this plugin).

¿Por qué sigo viendo un formulario de búsqueda en mi sitio a pesar de haber activado este plugin?

La causa más probable para esto es un tema que tiene el marcado para la búsqueda incorporado en uno o más archivos de plantilla del tema (excluyendo el archivo searchform.php). Esto está generalmente mal visto hoy en día (el tema debería llamar a get_search_form() o usar el archivo searchform.php para obtener el formulario de búsqueda). No hay forma de que este plugin evite que se muestre este formulario incorporado.

Sin embargo, aún si ese fuera el caso, el formulario no funcionará (gracias a este plugin), pero aún se mostrará.

Can the front-end search only be selectively disabled, allowing it to appear and work under certain conditions (such as only for logged-in users, etc)?

No, not at this time, though it is feature being considered. (In truth, custom coding could certainly be used to achieve this, but that obviously requires coding knowledge.)

¿Este plugin cumple el RGPD?

Sí. Este plugin no recopila, almacena o transmite información alguna de ningún usuario o visitante del sitio.

¿Incluye este plugin pruebas unitarias?

Sí.

Reseñas

2 de enero de 2022
Love this plugin! Really didn't want a search bar on my site and this took care of the problem. I have used this plugin for about a year with no hiccups at all. Thank you for developing it!
17 de septiembre de 2021
I was looking for hours to hide the search form in the theme I am using. This plugin worked in 2 clicks: install and activate Really great!!
Leer todas las 13 reseñas

Colaboradores y desarrolladores

«Desactivar la búsqueda» es un software de código abierto. Las siguientes personas han colaborado con este plugin.

Colaboradores

«Desactivar la búsqueda» está traducido en 4 idiomas. Gracias a los traductores por sus contribuciones.

Traduce «Desactivar la búsqueda» a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios

2.0.1 (2023-09-02)

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

2.0 (2021-09-13)

Highlights:

  • This release finally addresses disabling the search block, notes compatibility through WP 5.8+, and restructures unit test directories.

Details:

  • New: Disable the search block
    • New: Add disable_core_search_block() to unregister block via PHP
    • New: Add enqueue_block_editor_assets() to register JS script to unregister search block via JS
    • New: Add JS script file to unregister search block
    • Change: Update documentation to reflect search block being disabled
  • Change: Remove get_search_form() and simply use __return_empty_string() as callback to 'get_search_form' filter
  • Cambio: Nota de compatibilidad con WP 5.8 y superior
  • Change: Tweak installation instruction
  • Unit tests:
    • Change: Restructure unit test directories
      • Change: Move phpunit/ into tests/
      • Change: Move phpunit/bin into tests/
    • Change: Remove ‘test-‘ prefix from unit test file
    • Change: In bootstrap, store path to plugin file constant
    • Change: In bootstrap, add backcompat for PHPUnit pre-v6.0

1.8.3 (2021-05-01)

  • Fix: Change __wakeup() method visibility from private to public to avoid warnings under PHP8
  • Fix: Throw an error when attempting to unserialize an instance of the class to actually prevent it from happening

El registro de cambios completo está disponible en CHANGELOG.md..