Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Get list of taxonomy names for CPT
$args = array(
'object_type' => array( 'hotels' )
$output = 'names'; // or objects
$operator = 'and'; // 'and' or 'or'
$taxonomies = get_taxonomies( $args, $output, $operator );
if ( $taxonomies ) {
foreach ( $taxonomies as $taxonomy ) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.