Answers for "display all custom taxonomy term"

PHP
0

show all terms of a custom taxonomy

$terms = get_terms( array(
  'taxonomy' => 'taxonomy_name_or_slug',
  'hide_empty' => true,
) );
foreach ($terms as $term){
  echo $term->slug;
  echo $term->name;
  echo "<br><br>";
}
Posted by: Guest on July-20-2020

Code answers related to "display all custom taxonomy term"

Browse Popular Code Answers by Language