WordPress.org

Ready to get started?Download WordPress

Forums

Disable Search
[resolved] doesn't work with latest WP update (3 posts)

  1. AldrinD
    Member
    Posted 2 years ago #

    get message: Note: Your present theme (and/or parent theme) contains a searchform.php template file which cannot be overridden by the Disable Search plugin. Presumably the theme uses get_search_form() which will cause the search form to appear.

    http://wordpress.org/extend/plugins/disable-search/

  2. Scott Reilly
    WordPress & Plugin Dev
    Plugin Author

    Posted 2 years ago #

    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.

  3. Ryan Hellyer
    Member
    Posted 2 years ago #

    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 :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic