View next 3 events as a list

Home Forums Calendar Products Events Calendar PRO View next 3 events as a list

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1597575
    ncbaroqueorchestra
    Participant

    I tried::
    <// Retrieve the next 3 upcoming events
    $events = tribe_get_events( array(
    ‘posts_per_page’ => 3,
    ‘start_date’ => date( ‘2018-9-9’ )
    ) ); >
    On my homepage. Result: the text as seen above. What I am trying to achieve is the next 3 events, in list view. How do I do this?
    I’ve been using EC for a year, just upgraded to Pro.

    #1598964
    Victor
    Keymaster

    Hi Barbara!

    Thanks for getting in touch with us! I’d be happy to help you with this.

    If you need to retrieve the next 3 upcoming events, you can use the following code:

    $events = tribe_get_events( array(
    'posts_per_page' => 3,
    ));

    There’s no need to set a ‘start_date’ as it retrieves upcoming events by default. Let me share the following article as a reference > https://theeventscalendar.com/knowledgebase/using-tribe_get_events/

    I hope that helps 🙂 Let me know if any follow up questions

    Best,
    Victor

    #1601045
    ncbaroqueorchestra
    Participant

    Thanks

    #1601091
    Victor
    Keymaster

    You are welcome 🙂

    Since you marked this “Resolved”, I’ll go ahead and close the thread now.  Do feel free to open a new topic if anything comes up and we’ll be happy to help.

    Best,
    Victor

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘View next 3 events as a list’ is closed to new replies.