On custom_post_types.php page created under themes/mu-plugins
<?php
//Create New Post Type Here
function custom_post_types(){
register_post_type('event', array(
//All this is Front End Page
//this will rewrite slug from singular to plural when url /events/ instead of /event/
'rewrite' => array('slug' => 'events'),
//This will add functionality to the permalink etc
'has_archive' => true,
//All this is Admin
//Make it public
'public' => true,
//Add Title Editor and Excerpt to new page
'supports' => array('title', 'editor', 'excerpt'),
//Make it be edited on new "Block" gutenmberg conf
'show_in_rest' => true,
//Admin Left Navigation Label here
'labels' => array(
//Name of Admin title on Nav
'name' => 'Events',
// //Name of Add new on dropdown
'add_new' => 'Add New Event',
// //Name of Add new event when posting
'add_new_item' => 'Add New Event',
// 'edit_item' => 'Edit Event',
// //menu item All Events link
'all_items' => 'All Events',
// 'singular_name' => 'Event'
),
//Admin Icon Label
'menu_icon' => 'dashicons-calendar'
));
}
add_action('init', 'custom_post_types');