Skip Navigation

[Resolved] Search results Layout returning No Results when used with SearchWP Plugin

This thread is resolved. Here is a description of the problem and solution.

Problem:

The user's search is returning No results when the SearchWP plugin is active, but when relevanssi is active the results show up.

Solution:

I believe this is because of some incompatibility with our Toolset plugin and the SearchWP plugin.

For Toolset we recommend the use of the relevanssi plugin with the searches.

However the SearchWP team has provided a solution for this.

add_filter( 'searchwp_remove_pre_get_posts_during_search', '__return_true' );

Add the above to your functions.php file.

This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by liatG 5 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#1225339
Layout deactivated for Search Archives.jpg
Layout used for Search Archives.jpg
With SearchWP and Layouts.jpg
With Relevanssi and Layouts.jpg

I am trying to display search results using the SearchWP plugin.

I had a Search Results Archive page which was working fine with native WordPress Search and Relevanssi. When I deactivate Relevanssi and use SearchWP, the layout returns "no items found."

When I stop using the Layout for Search Archives, I see the SearchWP results, but they are very ugly and in need of a custom layout to be usable.

Do you know of a reason this might be happening? How can I use a Custom Layout to show SearchWP results?

Thank you,
Liat

#1225432

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Liat,

Thank you for contacting our support forum.

I believe this is because of some incompatibility with our Toolset plugin and the SearchWP plugin.

For Toolset we recommend the use of the relevanssi plugin with the searches.

I have no experience using the SearchWP plugin but i know that the Relevanssi plugin is compatible with toolset and the custom templates.

Thanks,
Shane

#1226554

Thank you Shane! That makes sense. For some reason Relevanssi is returning awful search results for me, worse than native search. So that is not an option. The SearchWP support team is looking into the issue as well, so if I find out any information from them I'll post here.

Thanks!

#1230262

I just wanted to let you all know that the SearchWP support team gave me one line of code to add to my functions.php file that fixed the "incompatibility." Now my results show up in the Toolset View with SearchWP just the same as with Relevanssi or native search.

add_filter( 'searchwp_remove_pre_get_posts_during_search', '__return_true' );

I hope this helps anyone else experiencing the same issue. You may want to update the "solution" to this problem with this new information.

Thanks,
Liat

#1231136

Hi Shane,
I'm so sorry to keep adding to this thread. I heard back again from the SearchWP team and the two plugins are not compatible after all.

From their support team:
"The results are not as expected because Toolset is overriding SearchWP query. That being said it looks like SearchWP is not compatible with Toolset at the moment."

Thanks,
Liat