-
-
Notifications
You must be signed in to change notification settings - Fork 95
Integration with Extended Taxonomies
John Blackbourn edited this page Dec 20, 2015
·
5 revisions
Extended Taxonomies is a companion library to Extended CPTs which allows you to create extended custom taxonomies in a similar way to creating extended custom post types.
You can use a shorthand method to create a custom taxonomy and associate it with your custom post type by using the add_taxonomy()
method on the Extended_CPT
object that's returned by register_extended_post_type()
. Example:
$example = register_extended_post_type( 'example', array(
'featured_image' => 'Example image',
) );
$example->add_taxonomy( 'foo', array(
'show_ui' => false,
) );
$example->add_taxonomy( 'bar', array(
'hierarchical' => false,
) );