Create events list in ASC order AND not show past events

Home Forums Calendar Products Events Calendar PRO Create events list in ASC order AND not show past events

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #835670
    Andrea
    Participant

    I’d really like to showcase the next four events in ASC order automatically (not using the Post Types Order plugin) AND not have past events show up.

    #840783
    Geoff
    Member

    Hi there, Joshua! Thanks for getting in touch. 🙂

    Good question. You can create a query for the posts you want to display. Events are set up as a custom post type and can be queried using the default WordPress get_posts() function. You can also use the tribe_get_events() function, which accepts the same parameters, plus allows you to set the “eventDisplay” option to “upcoming”.

    That might look something like this:

    tribe_get_events(
    'eventDisplay' => 'upcoming',
    'posts_per_page' => 4,
    'order' => 'ASC'
    );

    Of course, this will likely need to be modified to suit your specific needs. While this sort of customization is something we’ll have to leave in your hands, this should point you in the right direction. 🙂

    Here is a direct link to our documentation so you can see all the options available to you.

    Does that make sense? Will that work for you? Please let me know.

    Cheers!
    Geoff

    #864550
    Geoff
    Member

    Hey there, Joshua! Just checking in to see if there’s been any further update or if you still need assistance on this one–let me know. 🙂

    Cheers!
    Geoff

    #882529
    Geoff
    Member

    Hey there, Joshua! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to open a new thread. We’d be happy to help. 🙂

    Cheers!
    Geoff

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Create events list in ASC order AND not show past events’ is closed to new replies.