Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //list terms in a given taxonomy using wp_list_categories (also useful as a widget)
- $orderby = 'name';
- $order = 'ASC'; // Sort order for categories (either ascending or descending) 'ASC' or 'DESC'
- //$child_of = 278; // Only show child categories from Parent ID
- $show_count = 0; // 1 for yes, 0 for no
- $pad_counts = 0; // Calculates link or post counts by including items from child categories. 1 for yes, 0 for no
- $hierarchical = 1; // Display sub-categories as inner list items (below the parent list item) or inline. 1 for yes, 0 for no
- $taxonomy = 'Industries';
- $title = '';
- $depth = -1; // All Categories displayed in flat (no indent) form (overrides hierarchical).
- $hide_empty = 1;
- $args = array(
- 'orderby' => $orderby,
- 'order' => $order,
- 'show_count' => $show_count,
- 'pad_counts' => $pad_counts,
- 'hierarchical' => $hierarchical,
- 'taxonomy' => $taxonomy,
- 'title_li' => $title,
- 'depth' => $depth,
- 'child_of' => $child_of,
- 'hide_empty' => $hide_empty
- );
- ?>
- <?php
- wp_list_categories($args);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment