Guide Category
if ( ! function_exists( 'guides_category' ) ) {
// Register Custom Taxonomy
function guides_category() {
$labels = array(
'name' => _x( 'Guides Categories', 'Taxonomy General Name', 'guides_category' ),
'singular_name' => _x( 'Guide Category', 'Taxonomy Singular Name', 'guides_category' ),
'menu_name' => __( 'Guides Category', 'guides_category' ),
'all_items' => __( 'All Guides Categories', 'guides_category' ),
'parent_item' => __( 'Parent Category', 'guides_category' ),
'parent_item_colon' => __( 'Parent Category:', 'guides_category' ),
'new_item_name' => __( 'New Item Category', 'guides_category' ),
'add_new_item' => __( 'Add New Category', 'guides_category' ),
'edit_item' => __( 'Edit Category', 'guides_category' ),
'update_item' => __( 'Update Category', 'guides_category' ),
'view_item' => __( 'View Category', 'guides_category' ),
'separate_items_with_commas' => __( 'Separate categories with commas', 'guides_category' ),
'add_or_remove_items' => __( 'Add or remove categories', 'guides_category' ),
'choose_from_most_used' => __( 'Choose from the most used', 'guides_category' ),
'popular_items' => __( 'Popular Categories', 'guides_category' ),
'search_items' => __( 'Search Categories', 'guides_category' ),
'not_found' => __( 'Not Found', 'guides_category' ),
'no_terms' => __( 'No categories', 'guides_category' ),
'items_list' => __( 'Categories list', 'guides_category' ),
'items_list_navigation' => __( 'Categories list navigation', 'guides_category' ),
);
$rewrite = array(
'slug' => 'guide-category',
'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' => true,
'query_var' => 'guide_category',
'rewrite' => $rewrite,
);
register_taxonomy( 'guides_category', array( 'post' ), $args );
}
add_action( 'init', 'guides_category', 0 );
}