I have this simple snippet to retrieve the categories (taxonomies) of my Custom Post Type 'portfolio' I need to display each taxonomy but it displays all the categories.
I just saw this question Filter get_categories() for taxonomy term in WordPress and unfortunately I tried with no success.
<?php
query_posts("post_type=portfolio");
if ( have_posts() ) : while ( have_posts() ) : the_post();
$catid = get_cat_id('Images');
?>
<?php
$categories= get_categories('child_of='.$catid.'&orderby=name');
foreach ($categories as $cat) {
$input = '<li><a href="#" data-value="category-'.$cat->category_nicename.'">';
$input .= $cat->cat_name;
$input .= '</a></li>';
echo $input;
}
?>
Can you please guide me or give me a hint? Thanks so much.