Simply Exclude
Search function doesn't work 3.1 - 3.2 (8 posts)

  1. Bozz
    Posted 4 years ago #

    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?

  2. Bozz
    Posted 4 years ago #

    My solution to this problem was to remove the plugin and use an alternative.

  3. marikamitsos
    Posted 4 years ago #

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

  4. Bozz
    Posted 4 years ago #

    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');
  5. Paul Menard
    Plugin Author

    Posted 4 years ago #

    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.

  6. HeliR
    Posted 4 years ago #

    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

  7. Paul Menard
    Plugin Author

    Posted 4 years ago #

    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.

  8. Bozz
    Posted 4 years ago #

    @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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simply Exclude
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic