Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

sc_category

if ( ! function_exists( 'custom_taxonomy_sc_category' ) ) {

// Register Custom Taxonomy
function custom_taxonomy_sc_category() {

	$labels = array(
		'name'                       => _x( 'Categories', 'Taxonomy General Name', 'likabra' ),
		'singular_name'              => _x( 'Category', 'Taxonomy Singular Name', 'likabra' ),
		'menu_name'                  => __( 'Category', 'likabra' ),
		'all_items'                  => __( 'All Categories', 'likabra' ),
		'parent_item'                => __( 'Parent Category', 'likabra' ),
		'parent_item_colon'          => __( 'Parent Category:', 'likabra' ),
		'new_item_name'              => __( 'New Category Name', 'likabra' ),
		'add_new_item'               => __( 'Add New Category', 'likabra' ),
		'edit_item'                  => __( 'Edit Category', 'likabra' ),
		'update_item'                => __( 'Update Category', 'likabra' ),
		'view_item'                  => __( 'View Category', 'likabra' ),
		'separate_items_with_commas' => __( 'Separate Categories with commas', 'likabra' ),
		'add_or_remove_items'        => __( 'Add or remove Categories', 'likabra' ),
		'choose_from_most_used'      => __( 'Choose from the most used', 'likabra' ),
		'popular_items'              => __( 'Popular Categories', 'likabra' ),
		'search_items'               => __( 'Search Categories', 'likabra' ),
		'not_found'                  => __( 'Not Found', 'likabra' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
	);
	register_taxonomy( 'sc_category', array( 'studycard' ), $args );

}

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

}