this might be a simple question but I just can't get my hands around it.
I have a WP_query listing of custom post type in wordpress, and I need to have an appropriate taxonomies (categories) displayed for each one of those items in the list.
I tried googling and searching through stackoverflow but came up short.
Also, this is what I'm using for displaying all the taxonomy slugs that exist for a certain post type:
function get_taxonomy_classes($theID) {
$post_type = get_post_type($theID);
$taxonomies = get_object_taxonomies($post_type, 'objects');
$terms = get_terms($taxonomies, array(
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => TRUE
));
foreach($terms as $term) {
echo $term->slug . " ";
}
}
Still haven't found a way to use those terms with taxonomies above :(
Please help, thank you!