Skip Navigation

[Resolved] Displaying two view loops on a template – only first shows related items

This thread is resolved. Here is a description of the problem and solution.

Problem:

Display related posts with Views.

Solution:

You can follow our document to setup the views:

https://toolset.com/course-lesson/displaying-related-posts/

Relevant Documentation:

This support ticket is created 4 years ago. There's a good chance that you are reading advice that it now obsolete.

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by pieterV-2 4 years ago.

Assisted by: Luo Yang.

Author
Posts
#2141399
gervasio print & concert output.png
gervasio print & concert edit.png

I have the following custom types: "advert", "print" and "concert". The adverts are many-to-many related to the prints and also many-to-many to the concerts. They represent historical sources - adverts can be linked both to concerts and prints.

Currently I'm stuck at designing the template to display a single advert - besides the normal advert fields it needs to hold a loop view for the concerts (which works) but also a loop view for the prints (which doesn't show the related items).
If I switch to show all prints regardless of relationship, they are displayed. But if I select to display only the related items, nothing shows up.
I've put in an image to prove that I have not only a concert but also a print related (I've used a simple example with one advert, one print and one concert related to each other in order to isolate the issue).

What am I missing here?

#2141707

Hello,

The problem you mentioned above is abnormal, please check these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/

2) In case it is a compatibility problem, please deactivate all other plugins, and switch to WordPress default theme 2021, deactivate all custom PHP/JS code snippets, and test again

If the problem still persists, please provide a test site with the same problem, also point out the problem page URL and view URL, I need to test and debug it in a live website, thanks

#2141795

My issue is resolved now. Thank you!