📜  显示自定义分类的所有术语 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:08.427000             🧑  作者: Mango

代码示例1
$terms = get_terms( array(
  'taxonomy' => 'taxonomy_name_or_slug',
  'hide_empty' => true,
) );
foreach ($terms as $term){
  echo $term->slug;
  echo $term->name;
  echo "

"; }