Home › Forums › Calendar Products › Events Calendar PRO › filter UPCOMING events in V3?!
- This topic has 7 replies, 3 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
July 3, 2013 at 10:15 am #52967
tapps
ParticipantHELP! after upgrading to v3, my custom code is completely shot.
i’m using a query to be able to put UPCOMING events into my jquery slideshow on the homepage.. but they hide when they were no longer UPCOMING.
so PLEASE help me, i’ve been searching for what to replace this attribute:
‘eventDisplay’ => ‘upcoming’
with in the new update? i can’t find it anywhere! and having this removed seems to completely defeat the purpose of having a calendar plugin if i can’t hide non-upcoming events.July 3, 2013 at 10:38 am #52976tapps
Participantany devs here today?
July 3, 2013 at 1:53 pm #53044Barry
MemberHi Tracy!
The forums are indeed staffed today but (also for the benefit of others) you should be aware that although we strive to answer as quickly as possible that might not necessarily be any faster than within 24hrs of a thread being posted – also note that we do not typically provide weekend coverage.
i’m using a query to be able to put UPCOMING events into my jquery slideshow on the homepage.. but they hide when they were no longer UPCOMING.
It’s very difficult for me to guess without seeing the code: eventDisplay is still in use and upcoming is still a valid value for it – so I would really need a better picture of how your code looks and where and when it is running.
We usually recommend our tribe_get_events() function for this sort of work and, again, that has not changed – so I’m not sure what the problem is but please do share what you can (using Pastebin, Gist or a similar service rather than posting code directly in the forum) and I’ll be happy to take a look 🙂
July 5, 2013 at 12:39 pm #53501tapps
Participanthere’s the code:
===================
$query1 =
array(
‘post_type’=> ‘post’,
‘category_name’ => ‘Homepage Slideshow’,
‘showposts’ => 5,
‘orderby’ => rand
);
$query2 =
array (
‘post_type’ => ‘tribe_events’,
‘eventDisplay’ => ‘upcoming’,
‘tribe_events_cat’ => ‘featured-event’,
‘showposts’ => 5,
‘orderby’ => rand
);
$postGroup1 = get_posts( $query1);
$postGroup2= get_posts( $query2);$mergedcrap = array_merge($postGroup2, $postGroup1);
foreach ( $mergedcrap as $post ) { (the loop code here) }
==============
suddenly after update, all the past events were still showing up on the homepage. ( http://milwaukeesynod.org/ ) i temporally fixed this by going through and editing each. and. every. event that was categorized “featured-event” and unselecting that category (BWT, it would be nice to be able to mass un-select a category of a group of events… but i digress)so where is the error occurring if “upcoming” is still the correct filter?
July 5, 2013 at 2:53 pm #53557Barry
MemberYou’re using get_posts() and it may be that The Events Calendar-specific variables such as eventDisplay are not being respected (since that is a generic WordPress function).
Can you try again with tribe_get_events()?
July 16, 2013 at 10:36 pm #55640tapps
Participantyep. that seemed to work. thanks!
July 17, 2013 at 6:05 am #55660Barry
MemberExcellent!
July 7, 2015 at 6:27 am #980231Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘filter UPCOMING events in V3?!’ is closed to new replies.
