Ajout du post type event
This commit is contained in:
parent
ef8c27c23b
commit
cbadad3737
|
|
@ -109,3 +109,5 @@ function tailpress_nav_menu_add_submenu_class( $classes, $args, $depth ) {
|
|||
}
|
||||
|
||||
add_filter( 'nav_menu_submenu_css_class', 'tailpress_nav_menu_add_submenu_class', 10, 3 );
|
||||
|
||||
require_once(__DIR__ . '/includes/post-type.php');
|
||||
|
|
|
|||
24
includes/post-type.php
Normal file
24
includes/post-type.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
function create_posttype()
|
||||
{
|
||||
// **** Evenements
|
||||
register_post_type(
|
||||
'evenements',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Evénements', 'deligraph__texte-backoffice'),
|
||||
'singular_name' => __('Evénement', 'deligraph__texte-backoffice')
|
||||
),
|
||||
'public' => true,
|
||||
'has_archive' => false,
|
||||
'show_in_rest' => true,
|
||||
'menu_icon' => 'dashicons-pressthis',
|
||||
'menu_position' => 2,
|
||||
'supports' => array('title', 'custom-fields', 'page-attributes', 'thumbnail', 'revisions', 'excerpt'),
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
add_action('init', 'create_posttype');
|
||||
Loading…
Reference in New Issue
Block a user