In my mega menu, I have two loops, one nested in the other so that I display a taxonomy term as a header (Geographies) and then another loop to display a list of links for each {post_title}. It is part of the header which is working across the rest of the site.
However, on the Search Results page, the the list of links pulled via the nested query loop drop out completely unless the search term matches some portion of the field value {mb_producer_producer_name}
I’ve tried enabling Disable Query Merge and Is main query (Archive, Search), enabling one, the other, and neither all to no avail. I read this page (Filter: bricks/posts/merge_query – Bricks Academy), but I’m not clear is this is the source of the issue or not.
Could anyone shed light on how I might I address this issue?
Yes. I tried that, no luck. The nested query also uses a taxonomy query. Could that be the culprit? How else would I limit the post titles to only those of a specific term?
Also…and forgive me if this is just bone-headed because I’m not familiar with how this works, but why not put the option on the search to disable the query merge so that it can be done once, and not interfere with pages that may have multiple query loops that aren’t intended to merge with the search (e.g., where a search element exists in the header/footer)?
Hey,
so, I went and tried to reproduce it.
I’ve created 2 custom queries, where I first list Post Categories (term query), and then I list post (Post query)
I went back and checked through the settings…and found I had not set both to Disable Query Merge when I saved it and reviewed it. Only the top query was disabled. I should have checked more carefully. So that was the issue after all. Now, it’s working. Thank you!
Hehe, perfect I’m happy that we solved this and that it works
And maybe a word about your suggestion about your suggestion about having a “disable query merge” on a search element. This will not work, since you can search in multiple ways and it’s best if you can just update this on elements where you set up a query loop.
As a rule of thumb, if you use a query loop on a header or footer, then you probably want to enable this option