Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

BatesWintec Stockists Custom Post Type

// Register Custom Post Type
function custom_post_type_stockists() {

	$labels = array(
		'name'                => _x( 'Stockists', 'Post Type General Name', 'wntc' ),
		'singular_name'       => _x( 'Stockist', 'Post Type Singular Name', 'wntc' ),
		'menu_name'           => __( 'Stockists', 'wntc' ),
		'name_admin_bar'      => __( 'Stockists', 'wntc' ),
		'parent_item_colon'   => __( 'Stockist Parent:', 'wntc' ),
		'all_items'           => __( 'All Stockists', 'wntc' ),
		'add_new_item'        => __( 'Add New Stockist', 'wntc' ),
		'add_new'             => __( 'Add New', 'wntc' ),
		'new_item'            => __( 'New Stockist', 'wntc' ),
		'edit_item'           => __( 'Edit Stockist', 'wntc' ),
		'update_item'         => __( 'Update Stockist', 'wntc' ),
		'view_item'           => __( 'View Stockist', 'wntc' ),
		'search_items'        => __( 'Search Stockist', 'wntc' ),
		'not_found'           => __( 'Not found', 'wntc' ),
		'not_found_in_trash'  => __( 'Not found in Trash', 'wntc' ),
	);
	$args = array(
		'label'               => __( 'Stockist', 'wntc' ),
		'description'         => __( 'Contact details for Stockists', 'wntc' ),
		'labels'              => $labels,
		'supports'            => array( ),
		'hierarchical'        => false,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'menu_position'       => 10,
		'menu_icon'           => 'dashicons-store',
		'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'     => 'post',
	);
	register_post_type( 'stockists', $args );

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