I am wondering how to set up the following functionality:
I have a CPT of 'Events' as well as a CPT of 'Series Events'
The two are linked by a child CPT of 'Serial Event Includes'
What I want to be able to do is create a new Series Event - eg Events 2013
Then on each event select Events 2013 from a drop down list using the child CPT of 'Serial Event Includes' - (note that I have already got this working fine)
Then on an individual Event page, list all other events that share the Series Event of 'Events 2013'
Is this possible with Views, and how would I go about doing this?
Would this perhaps be something where the use of a custom taxonomy would be better suited?
Ok, I figured out that using a custom taxonomy works great.
I am having an issue though where if a post has no taxonomy then all posts are being listed by the view query.
So my view is filtering by:
Events
and
Select posts with taxonomy: Event Series the same as the current page
What do I need to include in the view to test if the event has a taxonomy applied and only list other events when a shared taxonomy is applied?
Ok, further to this dialogue with myself ... 🙂
I found the information on the HTML Conditionals help page, where there is a description on how to test for a taxonomy, so I have inserted the following into my view:
[wpv-if evaluate="'[wpv-post-taxonomy type="aaa-event-series" separator="" format="text"]' != ''"]
<wpv-loop>
[wpv-post-link]
</wpv-loop>
[/wpv-if]
So this is working well for me now. Thanks to your excellent documentation