List all upcoming programs, but not each individual occurrence

Home Forums Calendar Products Events Calendar PRO List all upcoming programs, but not each individual occurrence

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #18843
    Simon
    Participant

    I’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 ); ?>

    #18900
    Jonah
    Participant

    Hi 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,
    Jonah

    #18917
    Simon
    Participant

    Jonah, 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,
    – Si

    #18918
    Simon
    Participant

    Here’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.

    http://pastebin.com/G8YtZWEH

    #18929
    Jonah
    Participant

    Hi 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,
    Jonah

    #18936
    Simon
    Participant

    Sweet! Much better. Where would I find out how to display each program 1-time instead of # of event repetitions?

    #18939
    Jonah
    Participant

    Hi 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,
    Jonah

    #976773
    Support Droid
    Keymaster

    This 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.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘List all upcoming programs, but not each individual occurrence’ is closed to new replies.