Home › Forums › Calendar Products › Events Calendar PRO › List all upcoming programs, but not each individual occurrence
- This topic has 7 replies, 3 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
May 8, 2012 at 6:06 am #18843
Simon
ParticipantI’m looking to put together a page which lists all of our upcoming/ongoing programs. Is it possible to simply display 1 occurrence of each recurring program?
I’ve managed to call posts in a particular Events Calendar category, but the query is displaying every occurrence.
Here’s the code I’m currently using:
‘tribe_events_cat’,
‘post_type’=> ‘tribe_events’,
‘tag_ID’ => ‘7’
);
query_posts( $args ); ?>May 8, 2012 at 5:00 pm #18900Jonah
ParticipantHi Simon,
So you want to be able to display all instances of a particular reoccurring event or only 1?
Can you paste your code somewhere else like http://pastebin.com / http://pastie.org or http://gist.github.com so I can see what you’re working with?
Thanks,
JonahMay 9, 2012 at 6:47 am #18917Simon
ParticipantJonah, I’m looking to setup a page that publishes only 1 instance of recurring events from a particular event category.
For instance, I’ve got a bunch of recurring events in the Summer Camp category – I want to have a page that lists all the different summer camps, but only want each of the camps to show once. If Kestrel Camp meets 14 times I only want it to displayed once on this particular page.
How would one use query_posts to display a particular category of Events Calendar events? Also, how would one use query_posts to display each event only once?
Thanks,
– SiMay 9, 2012 at 6:49 am #18918Simon
ParticipantHere’s what I’m working with right now… It’s not working though … I’m yet to figure out how to query posts from a particular category within Events Calendar. Same with displaying each event only once.
May 9, 2012 at 10:10 am #18929Jonah
ParticipantHi Simon,
First, don’t use query_posts or get_posts for queries outside the loop. Those two query functions are more meant for modifying the current loop or getting post data to be used for other functions like in a plugin. Use WP_Query instead.
Another issue is you cannot use taxonomy as an argument like that, you’ve got to use tax_query and if you look at the third example for the tribe_get_events() function in our doco you can see how it is supposed to be used: https://theeventscalendar.com/support/documentation/the-events-calendar-template-tags-general-functions/#functiontribe_get_events
Another issue is you cannot tribe_meta_event_cats() as an argument. So if you clean up those things you should be able to get it to work.
Let me know if you need anything else with this.
Cheers,
JonahMay 9, 2012 at 10:25 am #18936Simon
ParticipantSweet! Much better. Where would I find out how to display each program 1-time instead of # of event repetitions?
May 9, 2012 at 10:36 am #18939Jonah
ParticipantHi Simon,
Perhaps this is along the lines of what you are looking for to limit the display of recurring events: https://theeventscalendar.com/support/forums/topic/reoccuring-event-shows-multiple-times-in-loop/
Unfortunately there’s no other easy way to do this…
I hope that helps!
Cheers,
JonahJuly 7, 2015 at 6:19 am #976773Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘List all upcoming programs, but not each individual occurrence’ is closed to new replies.
