Support » Plugins and Hacks » [Resolved] taxonomy-events-categories: cannot output $EM_Category

[Resolved] taxonomy-events-categories: cannot output $EM_Category

  • Hi

    I have had to use my own template to resolve some issues with menus. I have created the file taxonomy-events-categories.php and it has overridden the default event manager’s template.

    However I still wish to use the $EM_Category output like the single em template

    global $EM_Category;
    /* @var $EM_Category EM_Category */
    echo $EM_Category->output_single();

    but this returns an ‘trying to get property of non-object…’ when doing this.
    How do I include the output in my custom template?


Viewing 3 replies - 1 through 3 (of 3 total)
  • can you try this snippet?

    <?php get_header(); ?>
     <div class="post-inner">
      global $post, $EM_Category, $wp_query;
         $EM_Cat = em_get_category($wp_query->queried_object->term_id);
           <h1><?php echo $EM_Cat->output('#_CATEGORYNAME'); ?></h1><br/>
           <p><?php echo $EM_Cat->output('#_CATEGORYNOTES'); ?></p><br/>
           <h3>Next Events</h3><br/>
            <p><?php echo $EM_Cat->output('#_CATEGORYNEXTEVENTS'); ?></p>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Excellent – thanks agelonwl. That’s working a treat.

    thanks for confirming;

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] taxonomy-events-categories: cannot output $EM_Category’ is closed to new replies.