Guest User

Untitled

a guest
Nov 23rd, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. <?php
  2. global $wp_query, $post;
  3. $current_term = $wp_query->get_queried_object();
  4. $blog_cat = get_blog_sub_cats_str($type='array');
  5.  
  6. $category_id = (!file_exists(TEMPLATEPATH . '/library/includes/event_listing.'.(int)$_REQUEST['cat'].'.php')) ? '' : '.'.$category_id;
  7.  
  8. if($current_term->taxonomy=='eventcategory')
  9. {
  10.     require_once (TEMPLATEPATH . "/library/includes/event_listing{$category_id}.php");
  11. }elseif(in_array($current_term->term_id,$blog_cat) || is_day() || is_month() || is_year()) //blog category
  12. {
  13.     require_once (TEMPLATEPATH . "/library/includes/blog_listing{$category_id}.php");
  14. }else
  15. {
  16.     require_once (TEMPLATEPATH . "/library/includes/place_listing{$category_id}.php");
  17. }
  18. ?>
Add Comment
Please, Sign In to add comment