[Plugin: Events Manager] Fatal error when using own template single-event.php
-
Hi, maybe somebody can help me.
I use my own theme and plugin Events Manager 5.4.2. All works fine, but not single-event pages. I created my own template for them and called it single-event.php. I want to get header, 2 sidebars, menu and footer. But now I get the error: Fatal error: Call to a member function output_single() on a non-object instead of showing the event. I tried deleting single elements (as sidebars) but the problem is still there.
Here is my code:
<?php
* Template Name: Single-Eventget_header(); ?>
<div class=”container”>
<!– Sidebar laden –>
<div id=”sidebar”>
<?php
get_sidebar ();
?>
</div>
<!– end sidebar –><div id=”nav_kalender” role=”navigation”>
<?php wp_nav_menu( array( ‘theme_location’ => ‘untermenu-kalender’, ‘container_class’ => ‘my_extra_menu_class’ ) );?>
</div>
<!–end Untermenü Museum–><div class=”content2″>
<div id=Eventseite>
<?php
global $EM_Event;
/* @var $EM_Event EM_Event */
echo $EM_Event->output_single();
?></div>
<!– end EM content –></div>
<!– end content2 –><div id=”sidebar3″>
<?php get_template_part( ‘sidebar3’, ‘index’ ); ?>
</div>
<!– end Sidebar3 –></div>
<!– end inhalt –><?php
get_footer(); ?></div>
<!– end container –>I’m quite new to php, I really hope somebody can help me.
- The topic ‘[Plugin: Events Manager] Fatal error when using own template single-event.php’ is closed to new replies.