Skip Navigation

[Waiting for user confirmation] Relationship filter not working divi 5

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 5 replies, has 1 voice.

Last updated by Minesh 5 days, 2 hours ago.

Assisted by: Minesh.

Author
Posts
#2846281
rel.png

I am trying to:
I expect to see.

I have a relatinoship. programs--->teachers. when I view a program, I want to see the teachers related to that program. The view works fine when switching to another basic WP theme.

Instead, I got:

for some reason in divi 5, it shows the title of the page i'm on for each result, as apposed to the title of the teacher.

here is my loop:

[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-post-title]<br>
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
No teachers found
[/wpv-no-items-found]
[wpv-layout-end]

query filter is set properly (see pic), and to be sure, this does work on a regular theme. I see some posts saying that hint at toolset maybe not compatable going forward, would be a shame, been a user for many years.

possible work arounds?

#2846290

just some thoughts on the issue: Problem:
Toolset Views are not iterating correctly when displayed on pages built with Divi 5. The loop executes the correct number of times but outputs the same post data repeatedly instead of cycling through each queried post.
Setup:

Post Type: Programs (rgevent)
Related Post Type: Teachers
Toolset Relationship: rgevent-teacher (many-to-many)
View: Queries teachers related to the current program
Expected: Display 2 different teacher names
Actual: Displays the same title of the page twice, not the teachers, the actual name of the page.

What Works:

The same View works perfectly on other themes (tested and confirmed)
A custom function using toolset_get_related_posts() and get_the_title($id) works correctly in Divi 5
The View correctly identifies the number of related posts (loop runs correct number of times)

What Doesn't Work:

[wpv-post-title] outputs the current page title (program) instead of the queried post (teacher)
[wpv-post-title item="@rgevent-teacher.child"] outputs the first teacher's title repeatedly
[wpv-post-id] returns the same ID for each loop iteration
Issue persists regardless of where View is placed (Divi modules, WordPress blocks, the_content filter hook)

Diagnosis:
Divi 5 appears to be corrupting the global $post object or WordPress loop context, preventing Toolset Views from properly iterating through query results. The View can query relationships correctly but cannot access individual post data within the loop.
Request:
Need guidance on Divi 5 compatibility settings or filters to preserve proper WordPress loop context for Toolset Views.

#2846304

Key Finding:
Divi 5 has changed how the global $post object and loop context work. Their native "Loop Builder" only works correctly when using Divi-specific dynamic content fields. Standard WordPress functions like get_the_title() and the_post() within loops don't iterate properly in Divi 5's rendering environment.
Workaround That Works:
Using Toolset's API directly bypasses the issue:
php$related_teachers = toolset_get_related_posts(
$current_post_id,
'rgevent-teacher',
array('query_by_role' => 'parent', 'return' => 'post_id')
);
foreach ($related_teachers as $teacher_id) {
echo get_the_title($teacher_id);
}
Request:
Does Toolset have any known compatibility hooks or filters for Divi 5's modified loop context? Or is this something that needs to be addressed in a future compatibility update?
I've also submitted a ticket to Elegant Themes about this issue.

Just note. my "workaround" is not a "fix" btw.

#2846373

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

We understand your situation. For now, we do not have any solution as there is no compatibility tested with Divi 5 and Toolset.

We will not be able to guarantee compatibility between Divi 5 and Toolset at the moment.

Howevver - I've shared the workaround that might help you as given with the following realted ticket.
- https://toolset.com/forums/topic/toolset-view-not-displaying-relationship-posts-related-to-current-post/#post-2842810

Please let me know if you need further help in that case.

#2846414

great, the workaround fixes it.

I appreciate your help.

It doesn't sound like Toolset is actively looking at Divi 5 integration.

Unfortunetly this means I'll probably need to be migrating away from Toolset. have always liked using it, and have used it for many years....but if the support of a major Theme, that it historically has been supported, thats a big change.

Thanks for all your help! 🙂

#2846417

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - you should keep using Toolset without any issue but the compatibility may take some time and I do not have any timeframe or ETA as it depends on Divi as well how they should go forward for compatibility related work/tasks.