• Resolved abriel_s

    (@abriel_s)


    I’m currently testing out the website on testbuzz.illinimedia.com, upgrading WordPress to the latest version and the plugins. Even so, I get the following error:

    Fatal error: Call to undefined function em_get_events_array() in /home/darling/public_html/wp-content/themes/217child/template-magazine.php on line 113

    I also tried upgrading the theme used, Canvas Wootheme, to the newest version to ensure it was the theme as well as disabling all of the plugins. But, still didn’t affect anything. What could be triggering this error? Any help is appreciated!

    UPDATE: I also tried following this link by simply deleting and installing the template-magazine.php file in the child theme folder, but didn’t do anything

    http://wordpress.org/extend/plugins/events-manager/

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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
    }

    Thread Starter abriel_s

    (@abriel_s)

    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?

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    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.

    Thread Starter abriel_s

    (@abriel_s)

    @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.

    Thread Starter abriel_s

    (@abriel_s)

    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!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Homepage Not Showing Events’ is closed to new replies.