Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Pomeroy Subject Tax

if ( ! function_exists( 'wpd_subject_taxonomy' ) ) {

// Register Custom Taxonomy
function wpd_subject_taxonomy() {

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

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

}