I have two many to many relationships set up. One many to many relationship ties people to locations and the other one ties events to locations. These are using custom post types using this tutorial: https://toolset.com/documentation/user-guides/many-to-many-post-relationship/
What is happening: I display two views on one page. In other words I display related events and people on a single location page.
When I pull the data for the fields of the parent inside my view, each view pulls the actual many to many custom posts that are created for the many to many relationship. In other words, the view relating people to the location pulls the related people as well as the Custom Posts for the many to many relationship relating the events to the locations. Just the opposite happens as well, the view relating events to the location pulls the related events as well as the Custom Posts for the many to many relationship relating the people to the locations.
Hi vinceA,
Could you describe the question with more details?
Yes, you are right:
each view pulls the actual many to many custom posts that are created for the many to many relationship (the intermediary post type).
The example is this:
People relate to locations through the Many to Many relationship FROM
Events relate to locations through the Many to Many relationship HELD
There are 2 FROM relationships:
FROM-100 - Relates Joe to the Location
FROM-101 - Relates Mary to the Location
There are 2 HELD relationships:
HELD-100 - Relates Dinner to Location
HELD-101 - Relates Lunch to Location
On the locations page I pull two views in relating the associated people and events using FROM and HELD just as in the Many to Many example. I am pulling the title with a link. The issue is when I do this I get an output as follows:
People at this Location:
Joe
Mary
HELD-100
HELD-101
Events at this location:
FROM-100
FROM-101
Dinner
Lunch
I want to know how I can only show the related People and Events under each heading and block the display of the Many to Many relationship pages?
Here is a test site for you:
hidden link
user/pass: xgren/111111
views for People at this Location:
hidden link
views for Events at this location:
hidden link
content template for single location post:
hidden link
Hope it help
I got it! Thanks for the example. I had the relationship post types hidden. I unhid them and selected them in the view and it works perfectly. Thanks for taking the time.
Luoi, any chance you can re-activate those links examples or point me somewhere else. I have the same issue as VinceA.
I'm starting a new thread.
Let's close this one