Geting event post data into an array
-
Hi. I’m writing some PHP to get event post data and put it into an array, however my code is breaking when it encounters the EM_Event object as follows:
$postType = get_post_type($postID); //returns event
if($postType != EM_POST_TYPE_EVENT)
return(array());
$event = new EM_Event($postID, ‘post_id’); //code is crashing here
$location = $event->get_location();
$arrEvent = $event->to_array();
$arrLocation = $location->to_array();In this case, my event has a post_id of 30. Do I have the syntax of the EM_Event object wrong?
Any help is appreciated.
-Al
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Geting event post data into an array’ is closed to new replies.