Advertisement
all2aller

Get Category list Post Type

May 14th, 2013
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. <?php
  2. $tax_one = 'Project Type';
  3. $post_type = 'portfolio';
  4. $categories = get_categories( array(
  5.  'type' => $post_type,
  6.  'orderby' => 'name',
  7.  'order' => 'ASC',
  8.  'hide_empty' => 0,
  9.  'hierarchical' => 1,
  10.  'taxonomy' => $tax_one ));
  11. foreach ( $categories as $category ) :
  12. echo '<li>'.$category->name.'</li>'?>
  13. <?php endforeach; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement