amy-d
2/9/2016 - 9:27 PM

PHP: WP - Register Custom Taxonomy

PHP: WP - Register Custom Taxonomy

register_taxonomy(
    'type_of_staff',    // Taxonomy
    'staff',             // Object Type
    array(
        'label' => __( 'Type' ),
        'rewrite' => array( 'slug' => 'type' ),
        'hierarchical' => true, // Is this taxonomy hierarchical like categories or not hierarchical like tags.
    )
);