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