How to display a recurrent event only one time in a Loop

Home Forums Calendar Products Events Calendar PRO How to display a recurrent event only one time in a Loop

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1363052
    renaud maupoux
    Participant

    Hello,
    I made a slider that display my events (categorie : a-la-une ) with WP_query loop
    It works good exept when I use recurent event from one date to another.
    It displays as many events as days.

    Any ideas to fix it ? Here the code of my loop :

    $args = array( 'post_type' => 'tribe_events',
               'posts_per_page' =>-1, 
              'eventDisplay'   => 'custom',
              'tribe_events_cat' => 'a-la-une',
              );
    $the_query = new WP_Query( $args ); ?>
     
              <?php if ( $the_query->have_posts() ) : ?>
     
                <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
    ...
    #1364047
    renaud maupoux
    Participant

    Hello
    I fixed the bug directly in the events admin
    After having define my recurrent event with start en end date, I chose the require categorie “a-la-une” ONLY for one event and my loop doesn’t display all the events.

    #1364117
    Jennifer
    Keymaster

    Hi Renaud,

    Thanks for reaching out! I’m glad to hear you were able to find a solution to this, but I wanted to also share this post with you, which has some good tips on displaying only the first instance of a recurring event with WP_Query. Our themer’s guide is also a great resource when making customizations, so definitely take a look at that too!

    If there’s anything else I can help with, please let me know!

    Thanks,

    Jennifer

    #1376974
    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 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How to display a recurrent event only one time in a Loop’ is closed to new replies.