Support » Plugin: Disable Search » [Plugin: Disable Search] doesn't work with latest WP update

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Scott Reilly

    (@coffee2code)

    WordPress & Plugin Developer

    That message is intentionally output by the plugin when, as it says, a searchform.php file is present in your theme. The description for the plugin explains this in more detail. But basically a limitation in WP prevents the plugin from stopping the contents of searchform.php from being displayed. The notice is just meant to make you aware of that.

    The plugin still works to prevent searches from returning anything and removes the search widget. But if your theme has a searchform.php file, the search form will still appear.

    You can add a filter to your theme to suppress that notice if you don’t feel it is warranted. You can either add it to your theme, or to a custom plugin.

    add_filter( 'c2c_disable_search_hide_admin_nag', '__return_true' );

    I actually started editing the plugin about 15 mins ago to add this functionality into it but had totally missed that filter was already in there. Yet another reason to read the documentation first 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Disable Search] doesn't work with latest WP update’ is closed to new replies.