Search Everything
No results when active, please help trouble shoot (8 posts)

  1. JFrankParnell
    Posted 4 years ago #

    updated both wp and se. when plugin is activated, $posts is empty. Deactivate plugin, $posts has several results.

    custom search form, but nothing wierd:

    <form action="/" method="get" id="searchform" role="search">
            <div class="searchboxdiv"><input type="text" name="s" id="searchbox" class="<?php echo (!isset($_GET['s'])) ? 'clearfield' : "" ?>" value="<?php echo (isset($_GET['s'])) ? $_GET['s'] : "Search" ?>" /></div>
            <div class="searchbuttdiv"><input type="image" id="searchbutt" alt="Search" name="submit" src="<?php bloginfo( 'template_url' ); ?>/image/transparent.gif" height="24" width="24"  /></div>

    I can trouble shoot more(i know php), but i'd like a hint as to where to start looking for problems.


  2. JFrankParnell
    Posted 4 years ago #

    ok, to trouble shoot, i found around line 2631 of query.php is $this->posts = $wpdb->get_results($this->request); where you can echo $this->request which seems to give the ultimate sql for the search.

    I narrowed the problem down to this line:
    AND ( ctax.term_id NOT IN ( 6 )) [6 is a cat i want to exclude]

    And, indeed, when i deleted the cat 6 from the Exclude Categories: box, the search returned expected results.

    I do need to exclude cats from search, any ideas?

  3. Sarah_L
    Posted 4 years ago #

    I'm getting the same problem using Search Everything version with WordPress 3.4.1.

    I installed Search Everything because I need the search to only bring up Pages, not Posts.

    I can exclude Post/Page IDs in the settings for Search Everything, but as soon as I put even just one category number in the 'Exclude Categories' field, it doesn't find any results at all.

    Can anyone help, please?

  4. JFrankParnell
    Posted 4 years ago #

  5. Sarah_L
    Posted 4 years ago #

    Thank you, JFrankParnell.

    I've given up with this plug-in for Phase I of our website. Shame. :-)

  6. ninnypants
    Posted 3 years ago #

    I just wrote a fix for this issue that you can download to test here https://github.com/ninnypants/search-everything-wordpress-plugin/zipball/exclude_category_fix

  7. JFrankParnell
    Posted 3 years ago #

    with your fix, I get search results, but the category is not excluded. I put one of my cats id in the exclude box, saved options, searched for a word that was in only one post on the site, and in that excluded cat. The result, whether in the search on the plugin test search box or on the site's search box resulted in returning that post. Regular post_type->post.

  8. JFrankParnell
    Posted 3 years ago #

    Oh, wait... Ok, that post was in multiple cats. When i took the other cats off, it worked. So, hmm, how should this be? If the post is in any excluded cat, should it be returned? Realistically, for what i want to use this for, the current behavior works fine, but I could imagine this to be a problem for some ppl.

    Thanks for the fix!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Search Everything
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic