📅  最后修改于: 2022-03-11 14:54:08.427000             🧑  作者: Mango
$terms = get_terms( array(
'taxonomy' => 'taxonomy_name_or_slug',
'hide_empty' => true,
) );
foreach ($terms as $term){
echo $term->slug;
echo $term->name;
echo "
";
}