Posted By

ricosushi on 01/08/11


Tagged

subcategories


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

ricosushi


Subcategories Wp


 / Published in: PHP
 

  1. $myterms = get_term_by('slug', $cat_parent , 'taxonomy');
  2. $parent = $myterms->term_id;
  3.  
  4. $args = array(
  5. 'hide_empty'=>'0',
  6. 'parent'=> $parent,
  7. 'taxonomy' => 'taxonomy'
  8. );
  9. $categories = get_categories( $args );

Report this snippet  

You need to login to post a comment.