Hi, i added a function for Custom Post Types but i dose not seam to appear in the Wordpress dashboard menu. I tried adding the function in setup.php
as well as a mu-plugin
. Also I checked the screen options to see if custom post types was checked as well as saved the permalinks to flush_rewrite_rules()
.
This is my code.
function create_clients_post_type() {
$labels = array(
'name' => 'Clients',
'singular_name' => 'Client',
'menu_name' => 'Clients',
);
$args = array(
'labels' => $labels,
'public' => true,
'show_ui' => true,
'menu_position' => 21,
'show_in_menu' => true,
'menu_icon' => 'dashicons-welcome-learn-more',
'capability_type' => 'post',
);
register_post_type( 'client', $args );
}
add_action( 'init', 'create_clients_post_type', 12 );
Thank you