Recipe tags
if ( ! function_exists( 'recipe_tag' ) ) {
// Register Custom Taxonomy
function recipe_tag() {
$labels = array(
'name' => _x( 'Tags', 'Taxonomy General Name', 'mwm-grandchild-theme' ),
'singular_name' => _x( 'Tag', 'Taxonomy Singular Name', 'mwm-grandchild-theme' ),
'menu_name' => __( 'Tag', 'mwm-grandchild-theme' ),
'all_items' => __( 'All Tags', 'mwm-grandchild-theme' ),
'parent_item' => __( 'Parent Tag', 'mwm-grandchild-theme' ),
'parent_item_colon' => __( 'Parent Tag:', 'mwm-grandchild-theme' ),
'new_item_name' => __( 'New Tag Name', 'mwm-grandchild-theme' ),
'add_new_item' => __( 'Add New Tag', 'mwm-grandchild-theme' ),
'edit_item' => __( 'Edit Tag', 'mwm-grandchild-theme' ),
'update_item' => __( 'Update Tag', 'mwm-grandchild-theme' ),
'view_item' => __( 'View Tag', 'mwm-grandchild-theme' ),
'separate_items_with_commas' => __( 'Separate Tags with commas', 'mwm-grandchild-theme' ),
'add_or_remove_items' => __( 'Add or remove Tags', 'mwm-grandchild-theme' ),
'choose_from_most_used' => __( 'Choose from the most used', 'mwm-grandchild-theme' ),
'popular_items' => __( 'Popular Tags', 'mwm-grandchild-theme' ),
'search_items' => __( 'Search Tags', 'mwm-grandchild-theme' ),
'not_found' => __( 'Not Found', 'mwm-grandchild-theme' ),
'no_terms' => __( 'No Tags', 'mwm-grandchild-theme' ),
'items_list' => __( 'Tags list', 'mwm-grandchild-theme' ),
'items_list_navigation' => __( 'Tags list navigation', 'mwm-grandchild-theme' ),
);
$args = array(
'labels' => $labels,
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
'show_in_rest' => true,
);
register_taxonomy( 'recipe_tag', array( 'recipe' ), $args );
}
add_action( 'init', 'recipe_tag', 0 );
}