Last active
December 22, 2015 01:08
-
-
Save yellowberri-snippets/6393859 to your computer and use it in GitHub Desktop.
PHP: WP: Get All Terms in Taxonomy (even if not in post)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$taxonomy = 'services'; | |
$terms_args = array ( | |
'hide_empty' => false, | |
'orderby' => 'name', | |
'order' => 'ASC' | |
); | |
$terms = get_terms( $taxonomy, $terms_args); | |
foreach ( $terms as $term ) { | |
echo $term->name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment