• Resolved onei0120

    (@onei0120)


    Hey Guys,

    Amazing plug in thanks for all your hard work!

    I have a question, I wrote a query that pulls all the events for the current month (June)… since June doesnt fill the whole calendar the first week of July is included aswell.

    The issue is that my query is pulling the events for the 1st of July aswell, and since its the 1st its placing that event at the top of my june query instead of at the end

    Any idea how I can fix this? Heres my query

    <?php $event_archive_query = new WP_Query(‘post_type=tribe_events&meta_key=_EventStartDate&posts_per_page=-1&eventDisplay=upcoming&orderby=_EventStartDate&order=DESC’);
    while ($event_archive_query->have_posts()) : $event_archive_query->the_post(); ?>
    <div class=”swiper-slide”>
    <?php $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>
    ” title=”<?php the_title(); ?>”><img style=”width:100%;” src=”<?php echo $feat_image; ?>” />
    </div>
    <?php endwhile; ?>

    https://ww.wp.xz.cn/plugins/the-events-calendar/

Viewing 1 replies (of 1 total)
  • Geoff Graham

    (@geoffgraham)

    Hi onei0120,

    Thanks so much for the kind words! I’m definitely stoked to hear you’re loving the plugin. 🙂

    Good question. I think you may need to include an orderby parameter to your query to get the events to display properly. We also have a nice guide available here to help put events queries like this together.

    Cheers!
    Geoff

Viewing 1 replies (of 1 total)

The topic ‘Month Query issue’ is closed to new replies.