Show only childs of custom category
-
Im trying to show only the childs of a custom category.
I’m using this code to list child categories:
<? $caats = wp_get_post_terms( $post->ID, 'categoria_produtos'); $customPostTaxonomies = get_object_taxonomies('produtos'); if(count($customPostTaxonomies) > 0) { foreach($customPostTaxonomies as $tax) { $args = array( 'orderby' => 'name', 'show_count' => 0, 'pad_counts' => 0, 'hierarchical' => 1, 'taxonomy' => $tax, 'title_li' => '', 'child_of' => $caats[0]->parent ); wp_list_categories( $args ); } } ?>
is there anything wrong with it? i cant find the problem
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Show only childs of custom category’ is closed to new replies.