It is possible show past and news events in month template?

Home Forums Calendar Products Events Calendar PRO It is possible show past and news events in month template?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1318601
    Ferran
    Participant

    Hi,

    It is possible show old and new events from month template?

    I have a example, where at the firts load, calendar show the list from the nearest available event. But you should want click on an old event. In this case, the calendar doesn’t show anything because the initial query only loads the newest events.

    My query is this:

    $query = new WP_Query( array( 
    			'post_type' => 'tribe_events',
    			'posts_per_page' => -1,
    			'order' => 'ASC'
    		) );           
    
    		if ( $query->have_posts() ) : ?>
    			<?php while ( $query->have_posts() ) : $query->the_post(); ?>   ....

    Thanks!

    #1319762
    Victor
    Member

    Hello Ferran!

    Thanks for reaching out to us! 🙂 I’d be happy to help you with that.

    You might be able to achieve that by using the tribe_get_events() helper function we have available. There is a great article that will get you started on how to use it here > https://theeventscalendar.com/knowledgebase/using-tribe_get_events/

    I hope that helps! Let us know if you have any other questions.

    Best,
    Victor

    #1329550
    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 3 posts - 1 through 3 (of 3 total)
  • The topic ‘It is possible show past and news events in month template?’ is closed to new replies.