MW Celebrity Guests CPT
// Register Custom Post Type
function custom_post_type() {
$labels = array(
'name' => 'Celebrity Guests',
'singular_name' => 'Celebrity Guest',
'menu_name' => 'Celebrity Guests',
'name_admin_bar' => 'Celebrity Guest',
'archives' => 'Celebrity GuestArchives',
'attributes' => 'Celebrity GuestAttributes',
'parent_item_colon' => 'Parent Page:',
'all_items' => 'All Celebrity Guest',
'add_new_item' => 'Add New Celebrity Guest',
'add_new' => 'Add New Celebrity Guest',
'new_item' => 'New Celebrity Guest',
'edit_item' => 'Edit Celebrity Guest',
'update_item' => 'Update Celebrity Guest',
'view_item' => 'View Celebrity Guest',
'view_items' => 'View Celebrity Guest',
'search_items' => 'Search Celebrity Guest',
'not_found' => 'Celebrity Guest Not found',
'not_found_in_trash' => 'Celebrity Guest Not found in Trash',
'featured_image' => 'Featured Image',
'set_featured_image' => 'Set featured image',
'remove_featured_image' => 'Remove featured image',
'use_featured_image' => 'Use as featured image',
'insert_into_item' => 'Insert into Celebrity Guest',
'uploaded_to_this_item' => 'Uploaded to this Celebrity Guest',
'items_list' => 'Celebrity Guest list',
'items_list_navigation' => 'Celebrity Guest list navigation',
'filter_items_list' => 'Filter Celebrity Guest list',
);
$rewrite = array(
'slug' => 'famous-guests',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => 'Celebrity Guest',
'description' => 'Celebrity and other notable guests',
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'revisions' ),
'taxonomies' => array( 'category' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-star-filled',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => 'famous-guests-archive',
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'post',
'show_in_rest' => true,
);
register_post_type( 'celeb_guest', $args );
}
add_action( 'init', 'custom_post_type', 0 );