List all future and past events with pagination on custom page with WP_Query

Home Forums Welcome! Pre-Sales Questions List all future and past events with pagination on custom page with WP_Query

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1394763
    Milan
    Guest

    Hi,
    Is it possible to get all events in wp_query not just the future ones?
    I have a custom template with custom if while loop and pagination, but all I get is future events…
    I have created loop based on Create a custom list of events with pagination and if I set posts_per_page to -1 I get only future events, non of the past is showing…

    This is the code:

    <?php
    $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
    $upcoming = new WP_Query( array(
    'post_type' => 'tribe_events',
    'orderby' => 'event_date',
    'order' => 'DESC',
    'tribe_render_context' => 'default',
    'posts_per_page' => 1,
    'paged' => $paged,
    ) );

    // If we got some results, let's list 'em
    while ( $upcoming->have_posts() ) { $upcoming->the_post();
    $id = get_the_ID();
    $date = tribe_get_start_date($id, false, 'j F');
    echo '

    '. $date .'

    ';
    echo '

    '. get_the_title() .'

    ';
    }

    #1395116
    Barry
    Member

    Hi Milan 🙂

    Stoked to see you’re trying out interesting things with our plugins!

    I’m sorry to say though that we don’t offer technical support here in pre-sales:

    • If you have a user account and a valid license, please login and post on one of our premium forums
    • If you don’t have a valid license, consider buying one! You get access to premium support, fast access to updates and it’s a great way to support future development of the plugin suite, too
    • Or, post on the open community forums over on wordpress.org — another community member may be able to assist

    Thanks!

    #1396476
    Milan
    Guest

    Hi Barry,

    Thank you for quick response. I didn’t found solution for my problem but I think this could be great feature for some future versions of this great plugin.

    Thanks again and buy!

    #1396725
    Barry
    Member

    For sure – it’s certainly possible now, but it’s simply beyond the level of guidance we offer here in pre-sales. Appreciate the note, though 🙂

    #1412231
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘List all future and past events with pagination on custom page with WP_Query’ is closed to new replies.