• Resolved shnichols

    (@shnichols)


    Hello,

    Whenever I call EM_Events::get() I get all events that relate to my query however the returned array contains nulls for any event who’s dates have past. My query is as follows:
    $TempEvent = EM_Events::get(array(‘limit’ => ’20’));

    I only have 10 events and they all ‘return’ except where i can access all the properties for upcoming events, all past events are just null. I get the same result using WP_Query, and the database list all events with there details seemingly the same way. I can view/edit all events past/future in the admin panel but when trying to access them through php in my themes pages Events Manager seems to fail me. What am i doing wrong?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    You could try using:
    $TempEvent = EM_Events::get( array( 'limit' => '20', 'scope' => 'past' ));

    Thread Starter shnichols

    (@shnichols)

    This worked perfectly. looking back I see this in their documentation, however their documentation is pretty lax and I assumed I could get this data with WP_Query. Apparently I can’t so i’ll use this.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘EM_Events::get() doesn’t return past events’ is closed to new replies.