Photo
if ( ! function_exists('pwp_photo_custom_post_type') ) {
// Register Custom Post Type
function pwp_photo_custom_post_type() {
$labels = array(
'name' => 'Photos',
'singular_name' => 'Photo',
'menu_name' => 'Photos',
'name_admin_bar' => 'Photo',
'archives' => 'Photo Archives',
'attributes' => 'Photo Attributes',
'parent_item_colon' => 'Parent Photo',
'all_items' => 'All Photos',
'add_new_item' => 'Add New Photo',
'add_new' => 'Add New Photo',
'new_item' => 'New Photo',
'edit_item' => 'Edit Photo',
'update_item' => 'Update Photo',
'view_item' => 'View Photo',
'view_items' => 'View Photos',
'search_items' => 'Search Photos',
'not_found' => 'No Photos Found',
'not_found_in_trash' => 'Not found in Trash',
'featured_image' => 'Photo',
'set_featured_image' => 'Set Photo',
'remove_featured_image' => 'Remove Photo',
'use_featured_image' => 'Use as Photo',
'insert_into_item' => 'Insert Into Photo',
'uploaded_to_this_item' => 'Upload into this Photo',
'items_list' => 'Photos list',
'items_list_navigation' => 'Photos list navigation',
'filter_items_list' => 'Filter photos list',
);
$args = array(
'label' => 'Photo',
'description' => 'Paul Wood Photography Photo',
'labels' => $labels,
'supports' => array( 'title', 'thumbnail', 'comments', 'page-attributes' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 10,
'menu_icon' => 'dashicons-format-image',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
'show_in_rest' => true,
);
register_post_type( 'post_type', $args );
}
add_action( 'init', 'pwp_photo_custom_post_type', 0 );
}