filter UPCOMING events in V3?!

Home Forums Calendar Products Events Calendar PRO filter UPCOMING events in V3?!

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #52967
    tapps
    Participant

    HELP! 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.

    #52976
    tapps
    Participant

    any devs here today?

    #53044
    Barry
    Member

    Hi 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 🙂

    #53501
    tapps
    Participant

    here’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?

    #53557
    Barry
    Member

    You’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()?

    #55640
    tapps
    Participant

    yep. that seemed to work. thanks!

    #55660
    Barry
    Member

    Excellent!

    #980231
    Support Droid
    Keymaster

    This 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.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘filter UPCOMING events in V3?!’ is closed to new replies.