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