Archived topic
Unable to Get Search Results Template Working with Relevanssi
5 replies · Started by Jonathan on March 21, 2023
Hi there - I'm currently trying to build a search results template using the template loop and Relevanssi.
Steps I've taken:
1. Created an Element > Block > Content Template (Location: Search Results)
2. Set up a query loop, inherit queries from template
3. Set up Relevanssi premium (Out of the box, no PHP configuration)
Effectively, I get a series of weird, unrelated results to the keyword.
When I switch the template to Loop template, I get absolutely no results, as if the template is not even there.
I am also using Max Mega Menu's search box.
What am I doing incorrectly?
Hi Jonathan,
If you use a Content Template, you shouldn't add a Query Loop Block.
Here's an article with a video showing how to create one: https://docs.generatepress.com/article/block-element-content-template/
Can you try that and see how it goes?
I'll give it a shot and see how it goes. In the meantime, is there anything I need to do with Relevanssi beyond initial setup?
Well, if a Block Element won't work, you'll like need to create a template for it.
I was able to get this to work. Thank you!
You're welcome, Jonathan!