Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

List CPT

Use this CPT for creating lists. Lists name is general in nature, but its intended use is for creating wish lists.

// Register Custom Post Type
function list_post_type() {

	$labels = array(
		'name'                  => _x( 'Post Types', 'Post Type General Name', 'text_domain' ),
		'singular_name'         => _x( 'Post Type', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'             => __( 'Lists', 'text_domain' ),
		'name_admin_bar'        => __( 'Lists', 'text_domain' ),
		'archives'              => __( 'List Archives', 'text_domain' ),
		'parent_item_colon'     => __( 'Parent Item:', 'text_domain' ),
		'all_items'             => __( 'All Lists', 'text_domain' ),
		'add_new_item'          => __( 'Add New List', 'text_domain' ),
		'add_new'               => __( 'Add New List', 'text_domain' ),
		'new_item'              => __( 'New List', 'text_domain' ),
		'edit_item'             => __( 'Edit List', 'text_domain' ),
		'update_item'           => __( 'Update List', 'text_domain' ),
		'view_item'             => __( 'View List', 'text_domain' ),
		'search_items'          => __( 'Search List', 'text_domain' ),
		'not_found'             => __( 'List Not Found', 'text_domain' ),
		'not_found_in_trash'    => __( 'List not found in trash', 'text_domain' ),
		'featured_image'        => __( 'List Featured Image', 'text_domain' ),
		'set_featured_image'    => __( 'Set list featured image', 'text_domain' ),
		'remove_featured_image' => __( 'Remove list featured image', 'text_domain' ),
		'use_featured_image'    => __( 'Use as list featured image', 'text_domain' ),
		'insert_into_item'      => __( 'Insert into list', 'text_domain' ),
		'uploaded_to_this_item' => __( 'Uploaded to this list', 'text_domain' ),
		'items_list'            => __( 'Lists', 'text_domain' ),
		'items_list_navigation' => __( 'Lists navigation', 'text_domain' ),
		'filter_items_list'     => __( 'Filter Lists', 'text_domain' ),
	);
	$args = array(
		'label'                 => __( 'Post Type', 'text_domain' ),
		'description'           => __( 'Post Type Description', 'text_domain' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', 'page-attributes', '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,
		'capability_type'       => 'page',
	);
	register_post_type( 'post_type', $args );

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