Taxonomy_Project_Cateogory
if ( ! function_exists( 'tman_generate_project_category' ) ) {
// Register Custom Taxonomy
function tman_generate_project_category() {
$labels = array(
'name' => _x( 'Project Categories', 'Taxonomy General Name', 'tman' ),
'singular_name' => _x( 'Project Category', 'Taxonomy Singular Name', 'tman' ),
'menu_name' => __( 'Project Categories', 'tman' ),
'all_items' => __( 'All Project Categories', 'tman' ),
'parent_item' => __( 'Parent Project Category', 'tman' ),
'parent_item_colon' => __( 'Parent Item:', 'tman' ),
'new_item_name' => __( 'New Project Category', 'tman' ),
'add_new_item' => __( 'Add New Project Category', 'tman' ),
'edit_item' => __( 'Edit Project Category', 'tman' ),
'update_item' => __( 'Update Project Category', 'tman' ),
'view_item' => __( 'View Project Category', 'tman' ),
'separate_items_with_commas' => __( 'Separate items with commas', 'tman' ),
'add_or_remove_items' => __( 'Add or remove Project Category', 'tman' ),
'choose_from_most_used' => __( 'Choose from the most used', 'tman' ),
'popular_items' => __( 'Popular Project Categories', 'tman' ),
'search_items' => __( 'Search Project Categories', 'tman' ),
'not_found' => __( 'Not Found', 'tman' ),
);
$rewrite = array(
'slug' => 'projects',
'with_front' => false,
'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,
'rewrite' => $rewrite,
);
register_taxonomy( 'project-category', array( 'project' ), $args );
}
// Hook into the 'init' action
add_action( 'init', 'tman_generate_project_category', 0 );
}