Ingredients Custom Taxonomy
Taxonomy for Recipes custom post type
if ( ! function_exists( 'ingredients' ) ) { // Register Custom Taxonomy function ingredients() { $labels = array( 'name' => _x( 'Ingredients', 'Taxonomy General Name', 'cocktail_slices' ), 'singular_name' => _x( 'Ingredient', 'Taxonomy Singular Name', 'cocktail_slices' ), 'menu_name' => __( 'Ingredient', 'cocktail_slices' ), 'all_items' => __( 'All Ingredients', 'cocktail_slices' ), 'parent_item' => __( 'Parent Ingredient', 'cocktail_slices' ), 'parent_item_colon' => __( 'Parent Ingredient:', 'cocktail_slices' ), 'new_item_name' => __( 'New Ingredient Name', 'cocktail_slices' ), 'add_new_item' => __( 'Add New Ingredient', 'cocktail_slices' ), 'edit_item' => __( 'Edit Ingredient', 'cocktail_slices' ), 'update_item' => __( 'Update Ingredient', 'cocktail_slices' ), 'view_item' => __( 'View Ingredient', 'cocktail_slices' ), 'separate_items_with_commas' => __( 'Separate ingredients with commas', 'cocktail_slices' ), 'add_or_remove_items' => __( 'Add or remove ingredients', 'cocktail_slices' ), 'choose_from_most_used' => __( 'Choose from the most used', 'cocktail_slices' ), 'popular_items' => __( 'Popular Ingredients', 'cocktail_slices' ), 'search_items' => __( 'Search Ingredients', 'cocktail_slices' ), 'not_found' => __( 'Not Found', 'cocktail_slices' ), 'no_terms' => __( 'No ingredients', 'cocktail_slices' ), 'items_list' => __( 'Ingredients list', 'cocktail_slices' ), 'items_list_navigation' => __( 'Ingredients list navigation', 'cocktail_slices' ), ); $args = array( 'labels' => $labels, 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, ); register_taxonomy( 'ingredients', array( 'recipes' ), $args ); } add_action( 'init', 'ingredients', 0 ); }