Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Slides Post Type

Slides Post Type

// Register Custom Post Type
function btc_register_custom_post_types() {

	$labels = array(
		'name'                  => _x( 'Slides', 'Post Type General Name', 'btc' ),
		'singular_name'         => _x( 'Slide', 'Post Type Singular Name', 'btc' ),
		'menu_name'             => __( 'Slides', 'btc' ),
		'name_admin_bar'        => __( 'Slide', 'btc' ),
		'archives'              => __( 'Slide Archives', 'btc' ),
		'attributes'            => __( 'Slide Attributes', 'btc' ),
		'parent_item_colon'     => __( 'Parent Slide:', 'btc' ),
		'all_items'             => __( 'All Slides', 'btc' ),
		'add_new_item'          => __( 'Add New Slide', 'btc' ),
		'add_new'               => __( 'Add New Slide', 'btc' ),
		'new_item'              => __( 'New Slide', 'btc' ),
		'edit_item'             => __( 'Edit Slide', 'btc' ),
		'update_item'           => __( 'Update Slide', 'btc' ),
		'view_item'             => __( 'View Slide', 'btc' ),
		'view_items'            => __( 'View Slides', 'btc' ),
		'search_items'          => __( 'Search Slides', 'btc' ),
		'not_found'             => __( 'Slide Not found', 'btc' ),
		'not_found_in_trash'    => __( 'Slide Not found in Trash', 'btc' ),
		'featured_image'        => __( 'Featured Image', 'btc' ),
		'set_featured_image'    => __( 'Set featured image', 'btc' ),
		'remove_featured_image' => __( 'Remove featured image', 'btc' ),
		'use_featured_image'    => __( 'Use as featured image', 'btc' ),
		'insert_into_item'      => __( 'Insert into Slide', 'btc' ),
		'uploaded_to_this_item' => __( 'Uploaded to this Slide', 'btc' ),
		'items_list'            => __( 'Slides list', 'btc' ),
		'items_list_navigation' => __( 'Slides list navigation', 'btc' ),
		'filter_items_list'     => __( 'Filter Slides list', 'btc' ),
	);
	$args = array(
		'label'                 => __( 'Slide', 'btc' ),
		'description'           => __( 'Slideshow Slides', 'btc' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'custom-fields' ),
		'taxonomies'            => array( 'slideshow' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 10,
		'menu_icon'             => 'dashicons-images-alt',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => true,
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'capability_type'       => 'page',
	);
	register_post_type( 'slides', $args );

}
add_action( 'init', 'btc_register_custom_post_types', 0 );