Hi,
Can I know if you were able to find em_get_events_array on this php file template-magazine.php ?
e.g. using this instead
$posts = EM_Events::get( array('scope'=>'future', 'limit'=>1) );
foreach( $posts as $EM_Event ){
print_r( $EM_Event->get_location() ); //get location - test print
print_r( $EM_Event->get_categories() );//get categories - test print
}
Hi,
I actually couldn’t find the function em_get_events_array() in the template-magazine. But, I looked further in the old template before any installations, and in the older version of the plugin (v4.171), the programmer declared the following function in the em_functions.php file [in the main folder and the template folder] as follows:
function em_get_events_array($args) {
$events = em_get_events($args);
$events = explode('/%new%/',$events);
$i = 0;
foreach ($events as $e) {
$events[$i] = explode('/%break%/',$e);
$i++;
}
return $events;
}
I’m not sure if this function can be declared the same in the newest version of the plugin.
sorry abit confused, can I know what Events Manager version you are using right now?
in later versions you’d use
EM_Events::get($args);
mind you, I don’t recognize the code in that function from before, I’m thinking that was added by your developer making custom changes to the plugin core code.
@agelonwi I apologize, but I’m currently trying to use the latest code above in the newest version of Events Manager (v5.3.2.1)
@marcus Actually, there is a developer that did customize that code I believe in the plugin core (specifically in the em-functions.php folder)
Can you tell me specifically how I would call in those arguments? It looks like it should on the very core of the page, but because the way the code was written by the developer, not sure how to fix it so the inside doesn’t spew out this to the browser with the initial image the user inputs for that event:
8:30 AM/%break%/Alice Campbell Alumni Center/%break%/"Inside India" with Larry Kanfer/%break%/Free/%break%/Art & other exhibits/%break%/"Inside India" with Larry Kanfer/%break%/Friday, December 14, 2012/%break%/854/%break%/http://testbuzz.illinimedia.com/events-3/inside-india-with-larry-kanfer-12
The screenshot, which can be seen through this link also gives you an idea as well.
I figured out the problem… all I did was change the coding in the template file, then going into the Events > Settings > Formatting > Events Categories and formatted the events to be how I wanted them. 🙂
Thank you everyone for all the help!