Support » Plugin: Simply Exclude » Search function doesn't work 3.1 – 3.2

  • My site currently doesn’t produce search results. I have narrowed it down to the Simply Exclude plugin. When deactivated, search function works fine.

    I have tried this plugin on 3.1 and 3.2, exluding 1 category from the front page successfully, but now have no search results. I have tried usings “include only” for search and selecting every category, but that does not help.

    Anyone else experiencing this issue?

Viewing 7 replies - 1 through 7 (of 7 total)
  • My solution to this problem was to remove the plugin and use an alternative.

    Could you please share with us the name/link to the plugin that works?

    I had a requirement to exclude a certain category from the main page. I added this snippet of code to my functions.php to perform this. Change 425 to the category number you are trying to exclude:

    function exclude_category($query) {
    if ( $query->is_home ) {
    $query->set('cat', '-425');
    return $query;
    add_filter('pre_get_posts', 'exclude_category');
    Plugin Author Paul Menard


    Not sure what that snippet has to do with search. Just to be clear that snippet is somewhat the core functionality of the Simply Exclude plugin. There are 4 available ‘actions’, is_home, is_search, is_archive and is_feed. The SE plugin simply sets a filter to run on the ‘pre_get_posts’ filtering for these included/excluded categories, tags, authors. The bulk of the code for the plugin is to manage the admin UI.

    Pages are handled differently in WordPress. you best option for page search filtering is Search Everything.

    some redirection plugin seemed to have messed / changed my .htaccess

    I have the DirectoryIndex default off, and have to turn it on. Without directoryIndex index.php the search function does not work. This line did disappear in my htaccess without my influence and search stopped working

    # BEGIN WordPress
    DirectoryIndex index.php
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress

    Plugin Author Paul Menard


    HeliR, not sure if your comment was implied to relate to the Simply Exclude plugin. It does not alter, write to or otherwise setup permalink changes.

    One suggestion for you is to move the like ‘DirectoryIndex index.php’ above the ‘# BEBIG WordPress’ section.

    @pmenard that snippet was to demonstrate how I accomplished what I needed. Having the plugin activated was breaking the search, it may have to do with multiple plugins, but this was the one that when deactivated successfully restored my search functionality. I am clueless as to why, unfortunately.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Search function doesn't work 3.1 – 3.2’ is closed to new replies.