Custom Taxonomy
Custom Taxonomy
// Register Custom Taxonomy function custom_taxonomy() { $labels = array( 'name' => _x( 'Types', 'Taxonomy General Name', 'hardcosm' ), 'singular_name' => _x( 'Type', 'Taxonomy Singular Name', 'hardcosm' ), 'menu_name' => __( 'Type', 'hardcosm' ), 'all_items' => __( 'All Types', 'hardcosm' ), 'parent_item' => __( 'Parent Type', 'hardcosm' ), 'parent_item_colon' => __( 'Parent Type:', 'hardcosm' ), 'new_item_name' => __( 'New Type', 'hardcosm' ), 'add_new_item' => __( 'Add New Type', 'hardcosm' ), 'edit_item' => __( 'Edit Type', 'hardcosm' ), 'update_item' => __( 'Update Type', 'hardcosm' ), 'separate_items_with_commas' => __( 'Separate types with commas', 'hardcosm' ), 'search_items' => __( 'Search types', 'hardcosm' ), 'add_or_remove_items' => __( 'Add or remove types', 'hardcosm' ), 'choose_from_most_used' => __( 'Choose from the most used types', 'hardcosm' ), 'not_found' => __( 'Not Found', 'hardcosm' ), ); $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( 'type', array( 'type' ), $args ); } // Hook into the 'init' action add_action( 'init', 'custom_taxonomy', 0 );