<a href="<?php bloginfo('url'); ?> /feed" class="rss_link_2">Subscribe</a> <div class="clear"></div> </div>--> <?php } else { if (is_page('Events')) { ?> <!--<div class="EventsBox"> <h2 class="left Blue">Past Events</h2> <span class="right"><?php echo wt_get_category_count('Events'); ?> <span class="Blue">Events</span></span> <div class="clear">--><!-- DON'T DELETE --><!--</div> </div>--> <?php } } ?> <!--START OF COL --> <div class="Col"> <ul class="Lists box"> <?php $post_obj = $wp_query->get_queried_object();
</div> <?php $args = array('post-type' => 'workpost', 'taxonomy' => 'work_category', 'parent' => 0, 'hide_empty' => 0, 'posts_per_page' => -1); $cat_options = ''; $cat_options_new = ''; $cat_sub_options = ''; $cat_sub_options_new = ''; $terms = get_categories($args); foreach ($terms as $term) { $cat_options .= '<li value="' . $term->term_id . '">' . $term->name . '</li>'; $cat_options_new .= '<option class="filter cat' . $term->cat_ID . '" value="cat-' . $term->cat_ID . '">' . $term->name . '</option>'; //get all sub categories $args = array('post-type' => 'post', 'taxonomy' => 'work_category', 'title_li' => '', 'order_by' => 'name', 'child_of' => $term->term_id, 'hide_empty' => 0, 'posts_per_page' => -1); $subterms = get_categories($args); foreach ($subterms as $subterm) { $cat_sub_options .= '<li class="filtersub cat' . $term->cat_ID . '" filtercat="cat-' . $term->cat_ID . '" filtersubcat="cat-' . $subterm->cat_ID . '" >' . $subterm->name . ' (' . wt_get_category_count($subterm->cat_ID) . ')</li>'; $cat_sub_options_new .= '<option class="filtersub cat' . $term->cat_ID . '" value="cat-' . $subterm->cat_ID . '">' . $subterm->name . '</option>'; } //end get all sub categories } ?> <div id="new-pagefilters-pulldown" class="pulldown notdesktop"> <select id="new-pagefilters" class="notdesktop"> <option value="all">All</option> <?php echo $cat_options_new; ?> </select>
$cat_options = ''; //hold all category options $cat_sub_options = ''; //hold all sub category options $cat_title = '<span filtertitle="all">' . get_the_title() . '</span> '; //hold all titles $cat_desc = $allcontent; //hold all contents foreach ($terms as $term) { $cat_options .= '<li filter="cat-' . $term->cat_ID . '">' . $term->name . ' (' . wt_get_category_count($term->cat_ID) . ')</li>'; //get all sub categories $args = array('post-type' => 'leisurepost', 'taxonomy' => 'leisure_category', 'title_li' => '', 'order_by' => 'name', 'child_of' => $term->cat_ID); $subterms = get_categories($args); foreach ($subterms as $subterm) { //$cat_sub_options .= '<li class="filtersub" filtercat="cat-'.$term->cat_ID.'" filtersubcat="cat-'.$subterm->cat_ID.'" >'.$subterm->name.'('.wt_get_category_count($subterm->cat_ID).')</li>'; $cat_sub_options .= '<li class="filtersub cat' . $term->cat_ID . '" filtercat="cat-' . $term->cat_ID . '" filtersubcat="cat-' . $subterm->cat_ID . '" ><img src="' . get_template_directory_uri() . '/images/filtersub.png" width="16" height="16">' . $subterm->name . ' (' . wt_get_category_count($subterm->cat_ID) . ')</li>'; } //end get all sub categories $cat_title .= '<span filtertitle="cat-' . $term->cat_ID . '">' . $term->name . '</span> '; $cat_desc .= '<div filterdesc="cat-' . $term->cat_ID . '">' . apply_filters('the_content', $term->description) . '</div> '; } ?> <?php //get all country of orgins //speak to dan about this!!! ?> <?php $leisure_posts = ''; //holds all posts $leisure_map = ''; //holds all map markers
if ($catnum != '') { print 'var catnum = ' . get_query_var('cat') . ';' . "\n"; } if ($tag != '') { print "var tag = '" . get_query_var('tag') . "';" . "\n"; } //GETS TOTAL NUMBER OF POSTS if (is_home()) { //HOME print 'var numposts = ' . $numposts . ';'; } else { if (is_category()) { //CATEGORY PAGE $cat = get_query_var('cat'); $yourcat = get_category($cat); print 'var numposts = ' . wt_get_category_count($yourcat->slug) . ';'; } else { //TAG PAGE $tag = get_query_var('tag'); $yourtag = get_category($tag); $taxonomy = "post_tag"; $term = get_term_by('slug', $yourtag->slug, $taxonomy); $yourtag = $wp_query->get_queried_object(); print 'var numposts= ' . $yourtag->count . ';'; } } ?> var offset = 8; var col = 0; var counter = 0;