Reply To: Search Results Page Overwrite Layout issue

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search Results Page Overwrite Layout issue Reply To: Search Results Page Overwrite Layout issue

#11263

Ernest Marcinko
Keymaster

Hi Laura,

This looks like an override related issue to me. I believe that the plugin might accidentally override another posts loop as well, which causes this weird layout.

If I'm correct, then the following modification should get rid of the problem. Open up the wp-content\plugins\ajax-search-pro\includes\classes\filters\class-asp-searchoverride.php file on your server and scroll to line 24, which should be this:

if (!isset($wp_query->query_vars['s'])) {

..change that to:

if (!$wp_query->is_main_query() ||  !isset($wp_query->query_vars['s'])) {

and save the file.
Now try searching again to see if that made any difference.

Best,
Ernest Marcinko

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