Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

S34 Testimonial Category

if ( ! function_exists( 's34_testimonial_category' ) ) {

// Register Custom Taxonomy
function s34_testimonial_category() {

	$labels = array(
		'name'                       => _x( 'Testimonial Categories', 'Taxonomy General Name', 's34' ),
		'singular_name'              => _x( 'Testimonial Category', 'Taxonomy Singular Name', 's34' ),
		'menu_name'                  => __( 'Testimonial Category', 's34' ),
		'all_items'                  => __( 'All Testimonial Category', 's34' ),
		'parent_item'                => __( 'Parent Testimonial Category', 's34' ),
		'parent_item_colon'          => __( 'Parent Testimonial Category:', 's34' ),
		'new_item_name'              => __( 'New Testimonial Category Name', 's34' ),
		'add_new_item'               => __( 'Add New Testimonial Category', 's34' ),
		'edit_item'                  => __( 'Edit Testimonial Category', 's34' ),
		'update_item'                => __( 'Update Testimonial Category', 's34' ),
		'separate_items_with_commas' => __( 'Separate categories with commas', 's34' ),
		'search_items'               => __( 'Search Categories', 's34' ),
		'add_or_remove_items'        => __( 'Add or remove categories', 's34' ),
		'choose_from_most_used'      => __( 'Choose from the most used categories', 's34' ),
		'not_found'                  => __( 'Not Found', 's34' ),
	);
	$rewrite = array(
		'slug'                       => 'testimonial_category',
		'with_front'                 => true,
		'hierarchical'               => true,
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'query_var'                  => 'testimonial_category',
		'rewrite'                    => $rewrite,
	);
	register_taxonomy( 's34_testimonial_category', array( 's34_testimonial' ), $args );

}

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

}