Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Results being displayed in "Recent Posts" Widget
This topic contains 2 replies, has 2 voices, and was last updated by brubble51a 7 years, 2 months ago.
- AuthorPosts
- January 26, 2017 at 2:47 pm #11733
Hi,
When I perform a search the results appear on the WooCommerce product page as well as in the recent posts widget (or/and in WC Sale widget).
I have tested with the twenty fifteen theme (see attached file) and disabled other plugins – same results.
I do not think I was having this problem before the latest WooCommerce up-date, but I am not sure.
Thanks
GrantAttachments:
You must be logged in to view attached files.January 26, 2017 at 2:57 pm #11735Hi,
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 :)
January 28, 2017 at 2:48 pm #11749Thanks.
Seems to have done the trick.Grant
- AuthorPosts
You must be logged in to reply to this topic.