Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Produits

FL

if ( ! function_exists('products_post_type') ) {

// Register Custom Post Type
function products_post_type() {

	$labels = array(
		'name'                  => 'Produits',
		'singular_name'         => 'Produit',
		'menu_name'             => 'Produits',
		'name_admin_bar'        => 'Post Type',
		'parent_item_colon'     => 'Produit parent:',
		'all_items'             => 'Tous les produits',
		'add_new_item'          => 'Ajouter nouveau produit',
		'add_new'               => 'Nouveau produit',
		'new_item'              => 'Nouvel élément',
		'edit_item'             => 'Modifier élément',
		'update_item'           => 'Modifier produit',
		'view_item'             => 'Afficher produit',
		'search_items'          => 'Chercher produits',
		'not_found'             => 'Aucun produit trouvé',
		'not_found_in_trash'    => 'Aucun produit trouvé dans la poubelle',
		'items_list'            => 'Liste d'éléments',
		'items_list_navigation' => 'Parcourir liste d'éléments',
		'filter_items_list'     => 'Filtrer liste d'éléments',
	);
	$args = array(
		'label'                 => 'Produit',
		'description'           => 'Pages d'informations produits',
		'labels'                => $labels,
		'supports'              => array( 'title', 'thumbnail', ),
		'taxonomies'            => array( 'range', ' country_tag' ),
		'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,
		'capability_type'       => 'post',
	);
	register_post_type( 'product', $args );

}
add_action( 'init', 'products_post_type', 0 );

}