Skip to content

Instantly share code, notes, and snippets.

@Jakobuz
Last active December 6, 2017 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jakobuz/6b308d3429a51c95f740034ce404b7f7 to your computer and use it in GitHub Desktop.
Save Jakobuz/6b308d3429a51c95f740034ce404b7f7 to your computer and use it in GitHub Desktop.
Wordpress | Get all terms in custom Taxonomy
$taxonomies = array(
'custom_category'
);
$args = array(
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => false,
'exclude' => array(),
'exclude_tree' => array(),
'include' => array(),
'number' => '',
'fields' => 'all',
'slug' => '',
'parent' => '',
'hierarchical' => true,
'child_of' => 0,
'get' => '',
'name__like' => '',
'pad_counts' => false,
'offset' => '',
'search' => '',
'cache_domain' => 'core'
);
$terms = get_terms( $taxonomies , $args);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment