Formation – Taxo model
if ( ! function_exists( 'taxo_model' ) ) {
// Register Custom Taxonomy
function taxo_model() {
$labels = array(
'name' => _x( 'Models', 'Taxonomy General Name', 'i18n_car' ),
'singular_name' => _x( 'Model', 'Taxonomy Singular Name', 'i18n_car' ),
'menu_name' => __( 'Models', 'i18n_car' ),
'all_items' => __( 'All Models', 'i18n_car' ),
'parent_item' => __( 'Parent Model', 'i18n_car' ),
'parent_item_colon' => __( 'Parent Model:', 'i18n_car' ),
'new_item_name' => __( 'New ModelName', 'i18n_car' ),
'add_new_item' => __( 'Add New Model', 'i18n_car' ),
'edit_item' => __( 'Edit Model', 'i18n_car' ),
'update_item' => __( 'Update Model', 'i18n_car' ),
'separate_items_with_commas' => __( 'Separate Models with commas', 'i18n_car' ),
'search_items' => __( 'Search Models', 'i18n_car' ),
'add_or_remove_items' => __( 'Add or remove Models', 'i18n_car' ),
'choose_from_most_used' => __( 'Choose from the most used Models', 'i18n_car' ),
'not_found' => __( 'Not Found', 'i18n_car' ),
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => false,
);
register_taxonomy( 'model', array( 'car' ), $args );
}
// Hook into the 'init' action
add_action( 'init', 'taxo_model', 0 );
}