cpt_veille informationnelle
// Register Custom Post Type
function cpt_veille_info() {
$labels = array(
'name' => _x( 'Veilles info', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Veille info', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Veille informationnelle', 'text_domain' ),
'name_admin_bar' => __( 'Veille informationnelle', 'text_domain' ),
'archives' => __( 'Articles archivés', 'text_domain' ),
'parent_item_colon' => __( 'Article parent :', 'text_domain' ),
'all_items' => __( 'Tous les articles', 'text_domain' ),
'add_new_item' => __( 'Ajouter', 'text_domain' ),
'add_new' => __( 'Ajouter', 'text_domain' ),
'new_item' => __( 'Nouvelle veille info', 'text_domain' ),
'edit_item' => __( 'Modifier', 'text_domain' ),
'update_item' => __( 'Mettre à jour', 'text_domain' ),
'view_item' => __( 'Voir', 'text_domain' ),
'search_items' => __( 'Rechercher', 'text_domain' ),
'not_found' => __( 'Introuvable', 'text_domain' ),
'not_found_in_trash' => __( 'Introuvable dans la corbeille', 'text_domain' ),
'featured_image' => __( 'Image en Une', 'text_domain' ),
'set_featured_image' => __( 'Choisir une image en Une', 'text_domain' ),
'remove_featured_image' => __( 'Supprimer l'image en Une', 'text_domain' ),
'use_featured_image' => __( 'Utiliser comme image en Une', 'text_domain' ),
'insert_into_item' => __( 'Insérer dans l'article', 'text_domain' ),
'uploaded_to_this_item' => __( 'Téléchargements dans cet article', 'text_domain' ),
'items_list' => __( 'Liste des articles', 'text_domain' ),
'items_list_navigation' => __( 'Consulter la liste des articles', 'text_domain' ),
'filter_items_list' => __( 'Filtrer la liste des articles', 'text_domain' ),
);
$rewrite = array(
'slug' => 'veille_informationnelle',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => __( 'Veille info', 'text_domain' ),
'description' => __( 'Pour générer des veilles infos', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'revisions', 'custom-fields', 'page-attributes', 'post-formats', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-format-aside',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'post',
);
register_post_type( 'cpt_veille', $args );
}
add_action( 'init', 'cpt_veille_info', 0 );