Thread Starter
kn1g
(@kn1g)
ok, sry. I tried only “output” before. I think “get” will do the job 😉
Thread Starter
kn1g
(@kn1g)
Could it be that the option EM_Events::output(array( 'order'=>'DESC'
does not work?
Thread Starter
kn1g
(@kn1g)
tried $EM_Events = EM_Events::get(array('limit'=>$maxEventsDisplayed, 'orderby'=>'start_date'));
But got in trouble as i tried to access the elements. like $EM_Events[0]['event_id']
was not possible. How can i access the elements of the class? (Didn’t find a specific “getter” function) like “get_event_id”.
Sry, but i am still a bit confused by the structure of the Event classes and the task to loop properly through all events.
maybe this will help – http://wordpress.org/support/topic/plugin-events-manager-rss-feed-template-for-categories-located-where?replies=7
e.g.
$EM_Events = EM_Events::get(array('limit'=>$maxEventsDisplayed, 'orderby'=>'start_date'));
foreach ( $EM_Events as $EM_Event ) {
echo $EM_Event->event_id;
}
you can also try this if you want just an array:
EM_Events::get(array(‘array’=>true));
However, the event objects can be useful as they have loads of functions to help display things, check bookings etc.