Want more features on Pastebin? Sign Up, it's FREE!
Guest

single category template

By: a guest on Apr 2nd, 2013  |  syntax: None  |  size: 0.47 KB  |  views: 5  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php get_header(); ?>
  2.  <div class="post-inner">
  3.  <?php
  4.   global $post;
  5.   $terms = get_the_terms($post->id, 'event-categories');
  6.   if($terms) {
  7.    foreach($terms as $em_term) {
  8.      $EM_Category = em_get_category($em_term->term_id);
  9.      ?>
  10.      <h1><?php echo $EM_Category->output('#_CATEGORYNAME'); ?></h1>
  11.      <p><?php echo $EM_Category->output('#_CATEGORYNEXTEVENTS
  12. '); ?></p>
  13.      <?php
  14.    }
  15.   }
  16.  ?>
  17.  </div>
  18. <?php get_sidebar(); ?>
  19. <?php get_footer(); ?>
clone this paste RAW Paste Data