Taxonomie format
if ( ! function_exists( 'wh_formats' ) ) {
// Register Custom Taxonomy
function wh_formats() {
$labels = array(
'name' => _x( 'Formats', 'Taxonomy General Name', 'waouh' ),
'singular_name' => _x( 'Format', 'Taxonomy Singular Name', 'waouh' ),
'menu_name' => __( 'Formats', 'waouh' ),
'all_items' => __( 'Tous les formats', 'waouh' ),
'parent_item' => __( 'Format parent', 'waouh' ),
'parent_item_colon' => __( 'Format parent :', 'waouh' ),
'new_item_name' => __( 'Nouveau format', 'waouh' ),
'add_new_item' => __( 'Ajouter', 'waouh' ),
'edit_item' => __( 'Éditer le format', 'waouh' ),
'update_item' => __( 'Mettre à jour le format', 'waouh' ),
'view_item' => __( 'Voir le format', 'waouh' ),
'separate_items_with_commas' => __( 'Séparer les formats avec les virgules', 'waouh' ),
'add_or_remove_items' => __( 'Ajouter ou supprimer des formats', 'waouh' ),
'choose_from_most_used' => __( 'Choisir les plus utlisés', 'waouh' ),
'popular_items' => __( 'Formats populaires', 'waouh' ),
'search_items' => __( 'Rechercher des formats', 'waouh' ),
'not_found' => __( 'Introuvable', 'waouh' ),
'no_terms' => __( 'Aucun format', 'waouh' ),
'items_list' => __( 'Liste des formats', 'waouh' ),
'items_list_navigation' => __( 'Liste de navigation des formats', 'waouh' ),
);
$rewrite = array(
'slug' => 'format-sport',
'with_front' => true,
'hierarchical' => false,
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => false,
'query_var' => 'format',
'rewrite' => $rewrite,
);
register_taxonomy( 'format', array( 'wh_sports' ), $args );
}
add_action( 'init', 'wh_formats', 0 );
}