Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wordpress get terms by taxonomy

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,
]);
 
PREVIOUS NEXT
Tagged: #wordpress #terms #taxonomy
ADD COMMENT
Topic
Name
8+7 =