Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $taxonomy = 'category';
- $orderby = 'name';
- $show_count = 0;
- $pad_counts = 0;
- $hierarchical = 1;
- $title = '';
- $empty = 0;
- $args = array(
- 'taxonomy' => $taxonomy,
- 'orderby' => $orderby,
- 'show_count' => $show_count,
- 'pad_counts' => $pad_counts,
- 'hierarchical' => $hierarchical,
- 'title_li' => $title,
- 'hide_empty' => $empty
- );
- $all_categories = get_categories( $args );
- foreach ($all_categories as $cat) {
- if($cat->category_parent == 0) {
- $category_id = $cat->term_id;
- ?>
- <?php if( $cat->slug != 'sem-categoria' ): ?>
- <?php echo $cat->name; ?>
- <?php
- endif;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement