Prestation de services pour MES
// Register Custom Post Type
function prestation_register() {
$labels = array(
'name' => 'Prestations de services',
'singular_name' => 'Prestation de service',
'menu_name' => 'Prestations de services',
'name_admin_bar' => 'Prestations de services',
'parent_item_colon' => 'Noeud parent:',
'all_items' => 'Toutes les prestations',
'add_new_item' => 'Ajouter nouvelle prestation',
'add_new' => 'Ajouter',
'new_item' => 'Nouvelle prestation',
'edit_item' => 'Modifier prestation',
'update_item' => 'Mise à jour prestation',
'view_item' => 'Afficher prestation',
'search_items' => 'Chercher prestation',
'not_found' => 'Non trouvé',
'not_found_in_trash' => 'Non trouvé dans la corbeille',
);
$rewrite = array(
'slug' => 'prestation',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => 'Prestation de service',
'description' => 'Prestation de service unique avec son tarif et sa localisation',
'labels' => $labels,
'supports' => array( 'title', 'editor', 'custom-fields', ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-book-alt',
'show_in_admin_bar' => false,
'show_in_nav_menus' => false,
'can_export' => true,
'has_archive' => 'prestations',
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'post',
);
register_post_type( 'prestation', $args );
}
add_action( 'init', 'prestation_register', 0 );