Custom Post Type de base
Fait pour Gifrer
// Register Custom Post Type
function blog_gifrer() {
$labels = array(
'name' => _x( 'Articles', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Article', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Blog', 'text_domain' ),
'name_admin_bar' => __( 'Blog', '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 un nouvel article', 'text_domain' ),
'add_new' => __( 'Ajouter', 'text_domain' ),
'new_item' => __( 'Nouvel article', 'text_domain' ),
'edit_item' => __( 'Éditer', 'text_domain' ),
'update_item' => __( 'Mettre à jour', 'text_domain' ),
'view_item' => __( 'Voir l'article', 'text_domain' ),
'search_items' => __( 'Rechercher un article', 'text_domain' ),
'not_found' => __( 'non trouvé', 'text_domain' ),
'not_found_in_trash' => __( 'non trouvé', 'text_domain' ),
'featured_image' => __( 'Image à la Une', 'text_domain' ),
'set_featured_image' => __( 'Définir une image à la Une', 'text_domain' ),
'remove_featured_image' => __( 'Supprimer l'image à la Une', 'text_domain' ),
'use_featured_image' => __( 'Utiliser comme image à la Une', 'text_domain' ),
'insert_into_item' => __( 'Insérer dans l'article', 'text_domain' ),
'uploaded_to_this_item' => __( 'Ajouter à cet article', 'text_domain' ),
'items_list' => __( 'Liste des articles', 'text_domain' ),
'items_list_navigation' => __( 'Navigation', 'text_domain' ),
'filter_items_list' => __( 'Filtrer les articles', 'text_domain' ),
);
$args = array(
'label' => __( 'Article', 'text_domain' ),
'description' => __( 'AArticles de blog Gifrer', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'custom-fields', 'post-formats', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => '',
'show_in_admin_bar' => false,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'post',
);
register_post_type( 'Blog', $args );
}
add_action( 'init', 'blog_gifrer', 0 );