tmhsierra
Forum Replies Created
-
They let me know the following:
Divi 5 provides two filters that would allow Relevanssi to integrate with the Loop Builder:
divi.module.loop.extractCustomAttributes— allows a plugin to register custom attributes in the Loop Builder query settings.divi.loop.query_args— allows a plugin to modify the final query arguments before the loop query runs.
Would it be possible for Relevanssi to use these filters to register a custom attribute and modify the query arguments so that Relevanssi’s search results are returned in the Loop Builder? This would resolve the compatibility issue without requiring any changes to the Divi interface.
Sending them a request! Thank you!
Final update, for anyone who finds this thread with the same issue:
Following the earlier suggestions here, I confirmed with Elegant Themes (Divi) support that the Blog Module’s “Posts for Current Page” setting is supposed to use the posts already generated for the current page request (i.e., it should reflect Relevanssi’s modified search results) rather than building a separate query. They also confirmed there’s no documented filter hook for modifying the module’s internal query args, and recommended rebuilding the template using Divi 5’s newer Loop Builder for more explicit query control.
I rebuilt the Search Results template from scratch using Loop Builder (Section-level loop with a 3-column Flex layout, using the Loop Position variable to populate each column). This fully resolved the original display problem — I confirmed the loop iterates correctly and populates each of the 3 columns properly (tested with Relevanssi still deactivated, using the site’s default post list).
With Relevanssi reactivated, the exact same “No Results Found” behavior we started with returns, even with Query Type correctly set to “Posts for Current Page.” So after all of this, my conclusion is: this looks like a genuine compatibility gap between Relevanssi and Divi 5’s Loop Builder specifically — not a configuration issue on my end, and not something fixable through documented settings on either plugin’s side right now.
For anyone hitting this: I’ve gone back to using default WordPress search for the time being. It’s less feature-rich (no partial-word matching, no custom post type indexing) but it works correctly with Divi 5’s Loop Builder without any of this breakage.
Thanks to everyone who helped narrow this down — appreciate the troubleshooting, even though it landed on “not solvable right now” rather than a fix. Hopefully this saves the next person some time, and maybe this becomes fixable in a future Relevanssi or Divi update.
Thanks, that’s really helpful direction. I’ve reached out to Elegant Themes support to ask specifically:
- Whether the Blog Module’s “Posts For Current Page” setting reads from the main WP_Query, or constructs its own separate query
- If it’s a separate query, whether Divi exposes a filter hook to modify that query’s arguments before it runs (similar to WordPress core’s pre_get_posts)
I’ll report back here once I hear from them. If they confirm a hook exists, I’ll need a bit of guidance on the correct way to set the Relevanssi flag on that query via the hook — happy to share whatever they tell me about the hook’s name/parameters so we can figure out the right snippet together.
Appreciate you sticking with this one — it’s been a useful diagnostic process even though the root cause turned out to sit on the Divi side rather than Relevanssi’s.
That makes a lot of sense. Here’s exactly how the Search Results template is built in Divi:
- It’s a dedicated template in Divi’s Theme Builder, assigned to “Search Results” under Theme Builder’s “Use On” settings (separate from the “All Posts” template used elsewhere on the site)
- Inside it, there’s a Blog Module
- Under the Blog Module’s Content settings: “Posts For Current Page” is toggled ON
- Post Count is set to 12
- No Category, Tag, or Post Type filters are applied in the module’s Elements section
- I confirmed via Query Monitor that
relevanssi_query_vars()does fire on thequery_varshook for this request, and the SQL Relevanssi generates (captured via Query Monitor’s Database Queries panel) correctly returns 27 matching, valid, published posts when I run it directly
Given “Posts For Current Page” is Divi’s setting for “use whatever query is already running rather than a hardcoded list,” I assumed that meant it would pick up Relevanssi’s modified results — but based on what you’re describing, it sounds like the Blog Module may be constructing its own separate WP_Query (as a non-main query) rather than reading from the already-modified global $wp_query/$wp_the_query object. If that’s the case, it would run through pre_get_posts independently, and if Relevanssi only modifies the main query, this secondary query would fall back to a plain WordPress search.
Let me know what would be most useful to check next.
Forum: Fixing WordPress
In reply to: Website login not working, Website Features GlitchingThank you! We ended up turning our server on and off then our issue was resolved!