Unec-Type-Formation
Custom Type Formation Unec
if ( ! function_exists('custom_post_type') ) { // Register Custom Post Type function custom_post_type() { $labels = array( 'name' => _x( 'Formations', 'Post Type General Name', 'unec' ), 'singular_name' => _x( 'Formation', 'Post Type Singular Name', 'unec' ), 'menu_name' => __( 'Formation', 'unec' ), 'name_admin_bar' => __( 'Formation', 'unec' ), 'archives' => __( 'Archives', 'unec' ), 'attributes' => __( '', 'unec' ), 'parent_item_colon' => __( '', 'unec' ), 'all_items' => __( 'Toutes les formations', 'unec' ), 'add_new_item' => __( 'Ajouter une formation', 'unec' ), 'add_new' => __( 'Ajouter', 'unec' ), 'new_item' => __( 'Nouveau', 'unec' ), 'edit_item' => __( 'Modifier', 'unec' ), 'update_item' => __( 'Mettre à jour', 'unec' ), 'view_item' => __( 'Voir', 'unec' ), 'view_items' => __( 'Voir tout', 'unec' ), 'search_items' => __( 'Rechercher des formations', 'unec' ), 'not_found' => __( 'Non trouvée', 'unec' ), 'not_found_in_trash' => __( 'Non trouvée dans la corbeille', 'unec' ), 'featured_image' => __( 'Image sélectionnée', 'unec' ), 'set_featured_image' => __( 'Sélectionner une image', 'unec' ), 'remove_featured_image' => __( 'Supprimer l'image sélectionnée', 'unec' ), 'use_featured_image' => __( 'Sélectionner l'image', 'unec' ), 'insert_into_item' => __( '', 'unec' ), 'uploaded_to_this_item' => __( 'Associé à cette formation', 'unec' ), 'items_list' => __( 'Liste des formations', 'unec' ), 'items_list_navigation' => __( '', 'unec' ), 'filter_items_list' => __( '', 'unec' ), ); $args = array( 'label' => __( 'Formation', 'unec' ), 'description' => __( 'Les formations de l'IFCER Académie', 'unec' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'post-formats', ), 'taxonomies' => array( 'category', 'post_tag' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', ); register_post_type( 'formation', $args ); } add_action( 'init', 'custom_post_type', 0 ); }