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.
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.
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.
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.
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.