https://share.descript.com/view/Mb9qhNHNggF?transcript=false
// Custom URL Blog
function create_tour_post_type() {
register_post_type('tour',
array(
'labels' => array(
'name' => __('Tours'),
'singular_name' => __('Tour')
),
'public' => true,
'has_archive' => true,
'rewrite' => array('slug' => 'tour', 'with_front' => false),
'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments')
)
);
}
add_action('init', 'create_tour_post_type');
function create_destinations_post_type() {
register_post_type('portfolio',
array(
'labels' => array(
'name' => __('Destinations'),
'singular_name' => __('Destination')
),
'public' => true,
'has_archive' => true,
'rewrite' => array('slug' => 'destinations', 'with_front' => false),
'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments')
)
);
}
add_action('init', 'create_destinations_post_type');
function create_personnel_post_type() {
register_post_type('personnel',
array(
'labels' => array(
'name' => __('Personnel'),
'singular_name' => __('Person')
),
'public' => true,
'has_archive' => true,
'rewrite' => array('slug' => 'personnel', 'with_front' => false),
'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments')
)
);
}
add_action('init', 'create_personnel_post_type');
function create_room_post_type() {
register_post_type('room',
array(
'labels' => array(
'name' => __('Rooms'),
'singular_name' => __('Room')
),
'public' => true,
'has_archive' => true,
'rewrite' => array('slug' => 'room', 'with_front' => false),
'supports' => array('title', 'editor', 'thumbnail', 'excerpt', 'comments')
)
);
}
add_action('init', 'create_room_post_type');