Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Project Tag Taxonomy

A tag taxonomy for the Project CPT.

if ( ! function_exists( 'wf_tax_project_tags' ) ) {

// Register Custom Taxonomy
function wf_tax_project_tags() {

	$labels = array(
		'name'                       => _x( 'Project Tags', 'Taxonomy General Name', 'bb-theme' ),
		'singular_name'              => _x( 'Project Tag', 'Taxonomy Singular Name', 'bb-theme' ),
		'menu_name'                  => __( 'Project Tags', 'bb-theme' ),
		'all_items'                  => __( 'All Project Tags', 'bb-theme' ),
		'parent_item'                => __( 'Parent Project Tag', 'bb-theme' ),
		'parent_item_colon'          => __( 'Parent Project Tag:', 'bb-theme' ),
		'new_item_name'              => __( 'New Project Tag Name', 'bb-theme' ),
		'add_new_item'               => __( 'Add New Project Tag', 'bb-theme' ),
		'edit_item'                  => __( 'Edit Project Tag', 'bb-theme' ),
		'update_item'                => __( 'Update Project Tag', 'bb-theme' ),
		'view_item'                  => __( 'View Project Tag', 'bb-theme' ),
		'separate_items_with_commas' => __( 'Separate project tags with commas', 'bb-theme' ),
		'add_or_remove_items'        => __( 'Add or remove project tags', 'bb-theme' ),
		'choose_from_most_used'      => __( 'Choose from the most used', 'bb-theme' ),
		'popular_items'              => __( 'Popular Project Tags', 'bb-theme' ),
		'search_items'               => __( 'Search Project Tags', 'bb-theme' ),
		'not_found'                  => __( 'Not Found', 'bb-theme' ),
		'no_terms'                   => __( 'No project tags', 'bb-theme' ),
		'items_list'                 => __( 'Project Tags list', 'bb-theme' ),
		'items_list_navigation'      => __( 'Project Tags list navigation', 'bb-theme' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => false,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'show_in_rest'               => true,
	);
	register_taxonomy( 'project_tag', array( 'project' ), $args );

}
add_action( 'init', 'wf_tax_project_tags', 0 );

}