custom types commerçants
if ( ! function_exists('commercants') ) {
// Register Custom Post Type
function commercants() {
$labels = array(
'name' => _x( 'Commerçants', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Commerçant', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Commerçant', 'text_domain' ),
'name_admin_bar' => __( 'Commerçants', 'text_domain' ),
'parent_item_colon' => __( 'Commerçant parent:', 'text_domain' ),
'all_items' => __( 'Tous les commerçants', 'text_domain' ),
'add_new_item' => __( 'Ajouter un nouveau commerçant', 'text_domain' ),
'add_new' => __( 'Ajouter nouveau', 'text_domain' ),
'new_item' => __( 'Nouveau commerçant', 'text_domain' ),
'edit_item' => __( 'Modifier un commerçant', 'text_domain' ),
'update_item' => __( 'Mise à jour d'un commerçant', 'text_domain' ),
'view_item' => __( 'Voir un commerçant', 'text_domain' ),
'search_items' => __( 'Chercher un commerçant', 'text_domain' ),
'not_found' => __( 'Introuvable', 'text_domain' ),
'not_found_in_trash' => __( 'Introuvable dans la corbeille', 'text_domain' ),
);
$args = array(
'label' => __( 'commercant', 'text_domain' ),
'description' => __( 'Commerçant de l'association Coeur de Nogent', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'author', 'thumbnail', 'revisions', ),
'taxonomies' => array( 'type_commerce' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 20,
'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( 'commercant', $args );
}
// Hook into the 'init' action
add_action( 'init', 'commercants', 0 );
}