Exclude Multi-Day Events from "Upcoming" results if the start date has passed

Home Forums Calendar Products Events Calendar PRO Exclude Multi-Day Events from "Upcoming" results if the start date has passed

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #22562
    Kim
    Participant

    Hello.
    I have an instance of the ECP plugin that is returning 3 Upcoming Events into a block on the homepage. The client would like to exclude any multi-day events that have already begun (even if they haven’t ended) from that list.
    Could anyone help give me a nudge as to how I should edit the tribe_get_events query to remove any event that has reached its start date?

    Any help is greatly appreciated. Thanks!!!

    http://www.sunbridge.edu

    #22639
    Rob
    Member

    Hi there Kim. Thanks for reaching out here, and for your use of the plugin. While this particular issue is a bit outside my area of expertise, let me ask our dev Paul to take a look and try to point you in the right direction here. Stay tuned.

    #22733
    moderntribe
    Participant

    Hi, Ken! Could you show me what your current tribe_get_events query is? I’d be more than happy to help you get it set up to exclude events whose start date has already been reached.

    #22738
    Kim
    Participant

    Thanks Paul!

    ‘upcoming’,
    ‘posts_per_page’ => 3
    )); ?>

    ID, 0, ‘l, F d’); ?>
    post_title; ?>
    post_content, 8); ?> <a href="ID); ?>” class=”more” >› read more

    #22739
    Kim
    Participant

    [?php $events = tribe_get_events(array(
    ‘eventDisplay’ => ‘upcoming’,
    ‘posts_per_page’ => 3
    )); ?]
    [?php foreach ($events as $e): ?]
    …output…
    [?php endforeach ?]

    #22759
    Rob
    Member

    Hey Kim: thanks for the heads up. Paul will be able to take another look here sometime tomorrow (Thursday). Thanks for your patience so far!

    #22834
    moderntribe
    Participant

    Hi, Kim;
    After looking into this further, it looks like the Tribe Events API doesn’t have a good way of doing what you’re asking. Take a peek at tribe-event-query.class.php if you’re interested, and you may in fact find a way, but off the top of my head it looks like they are going to continue being returned. Sorry I couldn’t be of more assistance, and good luck with all your future The Events Calendar endeavors. 🙂

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Exclude Multi-Day Events from "Upcoming" results if the start date has passed’ is closed to new replies.