introducing parcours post type
This commit is contained in:
parent
b50bb888dc
commit
c68862c210
|
|
@ -44,6 +44,7 @@ add_action('admin_menu', 'change_menu_icon');
|
|||
// #### POST TYPES
|
||||
function create_posttype()
|
||||
{
|
||||
// **** CONSEILS
|
||||
register_post_type(
|
||||
'conseils',
|
||||
array(
|
||||
|
|
@ -61,11 +62,12 @@ function create_posttype()
|
|||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-pressthis',
|
||||
'menu_position' => 2,
|
||||
'supports' => array('title', 'editor', 'page-attributes', 'thumbnail'),
|
||||
'supports' => array('title', 'editor', 'page-attributes', 'thumbnail', 'revision'),
|
||||
// 'supports' => array('title', 'custom-fields', 'editor'),
|
||||
)
|
||||
);
|
||||
|
||||
// **** BROCHURES
|
||||
register_post_type(
|
||||
'brochures',
|
||||
array(
|
||||
|
|
@ -74,15 +76,17 @@ function create_posttype()
|
|||
'singular_name' => __('Brochure', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'hierarchical' => true,
|
||||
'show_in_rest' => true,
|
||||
'public' => true,
|
||||
'has_archive' => false,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-book',
|
||||
'menu_position' => 2,
|
||||
'position' => 2,
|
||||
'supports' => array('custom-fields', 'page-attributes', 'title'),
|
||||
)
|
||||
);
|
||||
|
||||
// **** QUESTIONS
|
||||
register_post_type(
|
||||
'questions',
|
||||
array(
|
||||
|
|
@ -92,14 +96,17 @@ function create_posttype()
|
|||
),
|
||||
'public' => true,
|
||||
'has_archive' => false,
|
||||
// 'rewrite' => array('slug' => 'questions'),
|
||||
// 'rewrite' => array('slug' => 'questions/%thematiques%'),
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-editor-help',
|
||||
'menu_position' => 2.1,
|
||||
'supports' => array('title', 'custom-fields', 'editor', 'excerpt'),
|
||||
'supports' => array('title', 'custom-fields', 'editor', 'excerpt', 'revision'),
|
||||
|
||||
// 'rewrite' => array('slug' => 'questions'),
|
||||
// 'rewrite' => array('slug' => 'questions/%thematiques%'),
|
||||
)
|
||||
);
|
||||
|
||||
// **** FICHES-INFOS
|
||||
register_post_type(
|
||||
'fiches-infos',
|
||||
array(
|
||||
|
|
@ -115,6 +122,8 @@ function create_posttype()
|
|||
'supports' => array('title', 'custom-fields'),
|
||||
)
|
||||
);
|
||||
|
||||
// **** VOCABULAIRE
|
||||
register_post_type(
|
||||
'vocabulaire',
|
||||
array(
|
||||
|
|
@ -131,6 +140,8 @@ function create_posttype()
|
|||
'supports' => array('title', 'custom-fields'),
|
||||
)
|
||||
);
|
||||
|
||||
// **** JOBS
|
||||
register_post_type(
|
||||
'jobs',
|
||||
array(
|
||||
|
|
@ -148,6 +159,8 @@ function create_posttype()
|
|||
|
||||
)
|
||||
);
|
||||
|
||||
// **** VIDEOS / WEBINAIRES
|
||||
register_post_type(
|
||||
'videos-webinaires',
|
||||
array(
|
||||
|
|
@ -165,6 +178,25 @@ function create_posttype()
|
|||
|
||||
)
|
||||
);
|
||||
|
||||
// **** VIDEOS / WEBINAIRES
|
||||
register_post_type(
|
||||
'parcours',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Parcours', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Parcours', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'public' => true,
|
||||
'has_archive' => true,
|
||||
'hierarchical' => true,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-forms',
|
||||
'supports' => array('title', 'custom-fields'),
|
||||
'supports' => array('title', 'editor', 'page-attributes', 'thumbnail', 'revision'),
|
||||
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
add_action('init', 'create_posttype');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user