Home › Forums › Calendar Products › Events Calendar PRO › Exclude Multi-Day Events from "Upcoming" results if the start date has passed
- This topic has 6 replies, 3 voices, and was last updated 11 years, 9 months ago by moderntribe.
-
AuthorPosts
-
July 23, 2012 at 9:33 am #22562KimParticipant
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!!!
July 24, 2012 at 11:10 am #22639RobMemberHi 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.
July 25, 2012 at 8:59 am #22733moderntribeParticipantHi, 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.
July 25, 2012 at 10:16 am #22738KimParticipantThanks Paul!
‘upcoming’,
‘posts_per_page’ => 3
)); ?>ID, 0, ‘l, F d’); ?>
post_title; ?>
post_content, 8); ?> <a href="ID); ?>” class=”more” >› read moreJuly 25, 2012 at 10:20 am #22739KimParticipant[?php $events = tribe_get_events(array(
‘eventDisplay’ => ‘upcoming’,
‘posts_per_page’ => 3
)); ?]
[?php foreach ($events as $e): ?]
…output…
[?php endforeach ?]July 25, 2012 at 5:56 pm #22759RobMemberHey Kim: thanks for the heads up. Paul will be able to take another look here sometime tomorrow (Thursday). Thanks for your patience so far!
July 27, 2012 at 9:40 am #22834moderntribeParticipantHi, 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. 🙂 -
AuthorPosts
- The topic ‘Exclude Multi-Day Events from "Upcoming" results if the start date has passed’ is closed to new replies.