Slideshows
if ( ! function_exists('slideshows_post_type') ) {
// Register Custom Post Type
function slideshows_post_type() {
$labels = array(
'name' => 'Slideshows',
'singular_name' => 'Slideshow',
'menu_name' => 'Slideshows',
'name_admin_bar' => 'Slideshows',
'archives' => 'Slideshow archives',
'attributes' => 'Slideshow attributes',
'parent_item_colon' => 'Parent slideshow:',
'all_items' => 'All slideshows',
'add_new_item' => 'Add new slideshow',
'add_new' => 'Add new slideshows',
'new_item' => 'New slideshow',
'edit_item' => 'Edit slideshow',
'update_item' => 'Update slideshow',
'view_item' => 'View slideshow',
'view_items' => 'View slideshows',
'search_items' => 'Search slideshow',
'not_found' => 'Slideshows not found',
'not_found_in_trash' => 'Slideshow 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 slideshow',
'uploaded_to_this_item' => 'Uploaded to this item',
'items_list' => 'Slideshows list',
'items_list_navigation' => 'Slideshows list navigation',
'filter_items_list' => 'Filter slideshows list',
);
$rewrite = array(
'slug' => 'slideshows',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => 'Slideshow',
'description' => 'Slideshow testing',
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'custom-fields', 'post-formats' ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'post',
'show_in_rest' => true,
);
register_post_type( 'slideshow_post_type', $args );
}
add_action( 'init', 'slideshows_post_type', 0 );
}