• Resolved xymox12

    (@xymox12)


    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?
    Thanks

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

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

    <?php get_header(); ?>
     <div class="post-inner">
     <?php
      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/>
           <div>
            <p><?php echo $EM_Cat->output('#_CATEGORYNEXTEVENTS'); ?></p>
           </div>
     </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    Thread Starter xymox12

    (@xymox12)

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

    thanks for confirming;

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