Homélie CPT DOMS TOULOUSE 2020
if ( ! function_exists('alba_cpt_homelie') ) {
// Register Custom Post Type
function alba_cpt_homelie() {
$labels = array(
'name' => _x( 'Homélies', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Homélie', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Homélies', 'text_domain' ),
'name_admin_bar' => __( 'Homélies', 'text_domain' ),
'archives' => __( 'Archive des homélies', 'text_domain' ),
'attributes' => __( 'Attributs des homélies', 'text_domain' ),
'parent_item_colon' => __( 'Homélie parente', 'text_domain' ),
'all_items' => __( 'Toutes les homélies', 'text_domain' ),
'add_new_item' => __( 'Ajouter une homélie', 'text_domain' ),
'add_new' => __( 'Ajouter une nouvelle', 'text_domain' ),
'new_item' => __( 'Nouvelle homélie', 'text_domain' ),
'edit_item' => __( 'Modifier homélie', 'text_domain' ),
'update_item' => __( 'Mettre à jour l'homélie', 'text_domain' ),
'view_item' => __( 'Voir l'homélie', 'text_domain' ),
'view_items' => __( 'Voir les homélies', 'text_domain' ),
'search_items' => __( 'Rechercher une homélie', 'text_domain' ),
'not_found' => __( 'Rien trouvé', 'text_domain' ),
'not_found_in_trash' => __( 'Rien trouvé dans la corbeille', 'text_domain' ),
'featured_image' => __( 'Image mise en avant', 'text_domain' ),
'set_featured_image' => __( 'Modifier l'image mise en avant', 'text_domain' ),
'remove_featured_image' => __( 'Supprimer l'image mise en avant', 'text_domain' ),
'use_featured_image' => __( 'Utiliser en tant qu'image mise en avant', 'text_domain' ),
'insert_into_item' => __( 'Insérer dans l'homélie', 'text_domain' ),
'uploaded_to_this_item' => __( 'Téléverser à l'homélie', 'text_domain' ),
'items_list' => __( 'Liste des homélies', 'text_domain' ),
'items_list_navigation' => __( 'Menu des homélies', 'text_domain' ),
'filter_items_list' => __( 'Filtrer parmi les homélies', 'text_domain' ),
);
$rewrite = array(
'slug' => '/homelie',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => __( 'Homélie', 'text_domain' ),
'description' => __( 'Post Type Description', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats' ),
'taxonomies' => array( 'jour-liturgique', ' anne-liturgique', ' temps-liturgique', ' annee-civile' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-tablet',
'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( 'homelie', $args );
}
add_action( 'init', 'alba_cpt_homelie', 0 );
}