refactoring post type
This commit is contained in:
parent
7d32ebca46
commit
8ce3f075a8
|
|
@ -1,29 +1,21 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// #### POST TYPES
|
// #### POST TYPES
|
||||||
function create_posttype()
|
function create_posttype()
|
||||||
{
|
{
|
||||||
|
$args = array(
|
||||||
register_post_type(
|
|
||||||
'search-and-find',
|
|
||||||
// CPT Options
|
|
||||||
array(
|
|
||||||
'labels' => array(
|
'labels' => array(
|
||||||
'name' => __('Cherche & trouve'),
|
'name' => __('Cherche trouve'),
|
||||||
'singular_name' => __('Cherche & trouve')
|
'singular_name' => __('Cherche trouve')
|
||||||
),
|
),
|
||||||
'public' => true,
|
'public' => true,
|
||||||
'has_archive' => true,
|
'has_archive' => true,
|
||||||
'rewrite' => array('slug' => 'cherche-et-trouve'),
|
|
||||||
'show_in_rest' => true,
|
'show_in_rest' => true,
|
||||||
'menu_icon' => 'dashicons-table-row-delete',
|
'menu_icon' => 'dashicons-table-row-delete',
|
||||||
'menu_position' => 4,
|
'menu_position' => 4,
|
||||||
'supports' => array('title', 'custom-fields', 'editor'),
|
'supports' => array('title', 'custom-fields', 'editor'),
|
||||||
|
|
||||||
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
register_post_type('search-and-find', $args);
|
||||||
}
|
}
|
||||||
add_action('init', 'create_posttype');
|
add_action('init', 'create_posttype');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user