post type chantiers

This commit is contained in:
Antoine M 2024-10-24 10:39:11 +02:00
parent df20f54690
commit aefa66cb37

View File

@ -10,7 +10,7 @@ function metiers_patrimoine_create_posttype()
{ {
// **** VOCABULAIRE // **** ARTISANS
register_post_type( register_post_type(
'artisans', 'artisans',
array( array(
@ -29,6 +29,24 @@ function metiers_patrimoine_create_posttype()
'supports' => array('title', 'custom-fields', 'thumbnail'), 'supports' => array('title', 'custom-fields', 'thumbnail'),
) )
); );
// **** VOCABULAIRE
register_post_type(
'chantiers',
array(
'labels' => array(
'name' => __('Chantiers', 'metiers-patrimoine-theme'),
'singular_name' => __('Chantier', 'metiers-patrimoine-theme')
),
'public' => true,
'has_archive' => true,
'show_in_rest' => true,
'menu_icon' => 'dashicons-hammer',
'menu_position' => 5.1,
'supports' => array('title', 'custom-fields', 'thumbnail', 'author', 'revisions'),
)
);
} }
add_action('init', 'metiers_patrimoine_create_posttype'); add_action('init', 'metiers_patrimoine_create_posttype');