Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Grade School Taxonomy

// Register Custom Taxonomy
function create_grade_school_tax() {

	$labels = array(
		'name'                       => _x( 'Grade Schools', 'Taxonomy General Name', 'text_domain' ),
		'singular_name'              => _x( 'Grade School', 'Taxonomy Singular Name', 'text_domain' ),
		'menu_name'                  => __( 'Grade School', 'text_domain' ),
		'all_items'                  => __( 'All Grade Schools', 'text_domain' ),
		'parent_item'                => __( 'Parent Grade School', 'text_domain' ),
		'parent_item_colon'          => __( 'Parent Grade School:', 'text_domain' ),
		'new_item_name'              => __( 'New Item Grade School', 'text_domain' ),
		'add_new_item'               => __( 'Add New Grade School', 'text_domain' ),
		'edit_item'                  => __( 'Edit Grade School', 'text_domain' ),
		'update_item'                => __( 'Update Grade School', 'text_domain' ),
		'view_item'                  => __( 'View Grade School', 'text_domain' ),
		'separate_items_with_commas' => __( 'Separate grade school with commas', 'text_domain' ),
		'add_or_remove_items'        => __( 'Add or remove grade schools', 'text_domain' ),
		'choose_from_most_used'      => __( 'Choose from the most used', 'text_domain' ),
		'popular_items'              => __( 'Popular Grade Schools', 'text_domain' ),
		'search_items'               => __( 'Search Grade Schools', 'text_domain' ),
		'not_found'                  => __( 'Not Found', 'text_domain' ),
	);
	$rewrite = array(
		'slug'                       => 'grade-school',
		'with_front'                 => true,
		'hierarchical'               => false,
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => false,
		'rewrite'                    => $rewrite,
	);
	register_taxonomy( 'grade_school_tax', array( 'listings_cpt' ), $args );

}

// Hook into the 'init' action
add_action( 'init', 'create_grade_school_tax', 0 );