• Resolved randyjensen

    (@randyjensen)


    I’m pulling events in through an API using tribe_get_events. My code is pretty much straight out of the documentation.

    $all_events = tribe_get_events(
    array(
    ‘eventDisplay’=>’upcoming’,
    ‘posts_per_page’=>5,
    ‘tax_query’=> array(
    array(
    ‘taxonomy’ => ‘tribe_events_cat’,
    ‘field’ => ‘slug’,
    ‘terms’ => ‘homepage’
    )))

    The problem is, there is an event from 11am-2pm today (April 23) that is _not_ coming back in this request. There is only 1 other event that should be coming back (which is) and the category is correctly checked.

    I’ve checked the time on the server and it’s correct.

    I’ve changed the end time of the event to 11pm just to test it and it correctly comes back in the request.

    Are “upcoming” events dropped by hour in tribe_get_events? If so, is there a way to get around this without modifying the plugin?

    https://wordpress.org/plugins/the-events-calendar/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Brook

    (@brook-tribe)

    Howdy randy,

    The unfortunate truth is that bit of our documentation is out of date. I’d like to see an update to it soon. You might checkout this example query of how to query from a certain date forward: http://pastebin.com/fXNyTthe You should be able to adapt that to querying from a certain time forward. All of that is run through TribeEventsQuery::pre_get_posts(), so you might check there to get a better understanding of how it works. Hopefully soon we will have our documentation updated and this will no longer be necessary, but until then I hope that helps. Cheers!

    – Brook

    Thread Starter randyjensen

    (@randyjensen)

    Thanks for the reply Brook. I’ll give that a shot!

    Plugin Contributor leahkoerper

    (@leahkoerper)

    Thanks randy! Good luck!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘tribe_get_events Seems to drop events too early’ is closed to new replies.