‘name’,
‘order’ => ‘ASC’,
‘hierarchical’ => true,
‘hide_empty’ => 0,
‘exclude’ => $st_hp_category_exclude,
‘pad_counts’ => 1
);
$st_categories = get_categories($st_hp_cat_args);
$st_categories = wp_list_filter($st_categories,array(‘parent’=>0));
// If there are catgegories
if ($st_categories) {
foreach($st_categories as $st_category) {
$st_cat_counter++;
if ((!is_int($st_cat_counter / 2)) && $st_cat_counter != 1) {
echo ‘
‘;} elseif ($st_cat_counter == 1)
{ echo ‘
‘;}
echo ‘
‘;
echo ‘
‘;
}
}
?>
(‘ . $st_category->count.’)‘; } echo ‘
‘; // Sub category $st_sub_category = get_category($st_category); $st_subcat_args = array( ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘exclude’ => $st_hp_subcategory_exclude, ‘child_of’ => $st_sub_category->cat_ID, ‘pad_counts’ => 1 ); $st_sub_categories = get_categories($st_subcat_args); $st_sub_categories = wp_list_filter($st_sub_categories,array(‘parent’=>$st_sub_category->cat_ID)); // If there are sub categories show them if ($st_sub_categories && (apply_filters( ‘knowhow_get_theme_option’, ‘st_hp_subcat’, null ) == 1)) { foreach($st_sub_categories as $st_sub_category) { ?>-
term_id ) . ‘” title=”‘ . sprintf( __( ‘View all posts in %s’, ‘knowhow’ ), $st_sub_category->name ) . ‘” ‘ . ‘>’ . $st_sub_category->name.’‘; if (apply_filters( ‘knowhow_get_theme_option’, ‘st_hp_subcat_counts’, null ) == ‘1’) { echo ‘(‘ . $st_sub_category->count.’)‘; } ?>
- ‘;
foreach($st_cat_posts as $post) : setup_postdata($post);
?>
- “> ‘; } echo ‘