WordPress.org

Ready to get started?Download WordPress

Forums

Search Everything
wp_nav_menu broken on search results (11 posts)

  1. ianatkins
    Member
    Posted 3 years ago #

    Hello.

    Running the latest version of wordpress and the Search Everything plugin, causes the 'wp_nav_menu' function in my theme not to the load the specified nav menu.

    If I disable the plugin wp_nav_menu works normally. Anyone experiencing this?

    Thanks.

    Ian.

  2. lipsk
    Member
    Posted 3 years ago #

    I have the same problem. But it happens in just one of the two sites I'm running. I can't find out what makes it work in one and break on the other.

  3. lipsk
    Member
    Posted 3 years ago #

    Just found out what causes the problem on my site. It happens when I fill the "Exclude categories" field.

  4. ianatkins
    Member
    Posted 3 years ago #

    Yeah I can confirm that aswell, I was excluding a category.

    Looks like we've found us a bug.

  5. WebEndev
    Member
    Posted 2 years ago #

    I have the same results when excluding categories.

    Has the plugin dev seen this post?

  6. rosaleen.ortiz
    Member
    Posted 2 years ago #

    Same problem here. Are the developers working on a fix?

  7. raytri
    Member
    Posted 2 years ago #

    I figured out how to fix it, but you'll have to edit the "search-everything.php" plugin file to do so.

    On line 257, replace this:

    add_filter('posts_search', array(&$this, 'se_search_where'));

    with this:

    add_filter('posts_search', array(&$this, 'se_search_where'),10,2);

    Then, on line 341, replace the following code at the top of the se_search_where function:

    function se_search_where($where)
    
    	{
    
    		global $wp_query, $wpdb;

    with this:

    function se_search_where($where, $wp_query)
    
    	{
    
    		  if ( $GLOBALS['wp_query'] !== $wp_query )
        return $search;

    What this does is say, "If this isn't the same query created by Search Everything, don't add the Search Everything "where" clause to the query."

  8. zhanglei5415
    Member
    Posted 2 years ago #

    raytri,
    awsome, thanks for your share.

  9. raytri
    Member
    Posted 2 years ago #

    I've got good news: the developer got involved, and a fix should be out in an upcoming update.

    Meanwhile, we came up with a better fix than the one above.

    Instead of this line:

    if ( $GLOBALS['wp_query'] !== $wp_query )

    Use this:

    if(!$wp_query -> is_search())

    This makes the fix work for every sort of search, not just the main Search Everything query.

  10. Teewhy143
    Member
    Posted 2 years ago #

    Hi. Sorry to bother you, but I just installed the latest version of 'search-everything'. I've never had a previous version. I see a 'screenshot' over here --> http://wordpress.org/extend/plugins/search-everything/screenshots/, but I dont have a 'settings' or 'options' button to get to this screen. Any idea where I'm going wrong? Thanks a lot. I appreciate it.

  11. Teewhy143
    Member
    Posted 2 years ago #

    Found it. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic