Reply To: Results being displayed in "Recent Posts" Widget

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Results being displayed in "Recent Posts" Widget Reply To: Results being displayed in "Recent Posts" Widget

#11735

Ernest Marcinko
Keymaster

Hi,

This is a known issue, related to the latest wp versions and the last plugin update. Basically the plugin accidentally overrides other queries if it's not distinguishable from search.

To temporarily fix it, you will have to change one of the plugin files. Open up the wp-content\plugins\ajax-search-pro\includes\classes\filters\class-asp-searchoverride.php file and change lines 24-26 from this:

if (!isset($wp_query->query_vars['s'])) {
    return $posts;
}

to this:

if (!$wp_query->is_main_query() ||  !isset($wp_query->query_vars['s']) || !isset($_GET['s']) ) {
    return $posts;
}

This should do the trick.

If you need help with this, then feel free to provide temporary FTP details and I will do it for you.

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)