I have a Single Layout I created for a CPT called events (using a plugin called TheEventsCalendar). This plug-in also created another CPT called Organizer and can assign multiple organizers to an event. I have an event with 2 organizers.
When I am adding the post meta I can see that the post is referencing the IDs of the organizers that are created and assigned to the post:
_EventOrganizerID = 2989
_EventOrganizerID = 1900
So I created a div
and added a looper with a query string as follows:
post_type=tribe_organizer&posts_per_page=0&post_status=publish&orderby=title&order=ASC&offset=0
This returns all the organizers that have been created.
How do I filter out the two IDs that are part of the post meta?
If I alter the string to:
post_type=tribe_organizer&posts_per_page=0&post_status=publish&orderby=title&order=ASC&offset=0&p={{dc:post:meta key="_EventOrganizerID"}}
This query will pull in the data for the organizers but only the first one (ID = 2989)
How do I then loop through the post meta IDs? I assume that I need to make an array
for the p
key in the string but I am unclear on how to do this.