WordPress mendapatkan taksonomi sebuah pos
//Get all terms (names) of a taxonomy of a post
$term_obj_list = get_the_terms( $post->ID, 'taxonomy_name' ); ?>
gtamborero
//Get all terms (names) of a taxonomy of a post
$term_obj_list = get_the_terms( $post->ID, 'taxonomy_name' ); ?>
You need to pass an additional argument to get_terms(). The default is to hide
"empty" terms-- terms which are assigned to no posts.
$terms = get_terms([
'taxonomy' => $taxonomy,
'hide_empty' => false,
]);