Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

custom post

// Register Custom Post Type
function efox_trial_sales() {

	$labels = array(
		'name'                  => 'Trial Customers',
		'singular_name'         => 'Trial Customer',
		'menu_name'             => 'Customers',
		'name_admin_bar'        => 'Customers',
		'parent_item_colon'     => 'Parent Item:',
		'all_items'             => 'All Customers',
		'add_new_item'          => 'Add New Customer',
		'add_new'               => 'Add Customer',
		'new_item'              => 'New Customer',
		'edit_item'             => 'Edit Customer',
		'update_item'           => 'Update Customer',
		'view_item'             => 'View Customer',
		'search_items'          => 'Search Customers',
		'not_found'             => 'Customer Not found',
		'not_found_in_trash'    => 'Not found in Trash',
		'items_list'            => 'Customer list',
		'items_list_navigation' => 'Customer list navigation',
		'filter_items_list'     => 'Filter Customer list',
	);
	$rewrite = array(
		'slug'                  => 'post_type',
		'with_front'            => false,
		'pages'                 => true,
		'feeds'                 => false,
	);
	$capabilities = array(
		'edit_post'             => 'edit_post',
		'read_post'             => 'read_post',
		'delete_post'           => 'delete_post',
		'edit_posts'            => 'edit_posts',
		'publish_posts'         => 'publish_posts',
		'read_private_posts'    => 'read_private_posts',
	);
	$args = array(
		'label'                 => 'Trial Customer',
		'description'           => 'Add Customer Info here',
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'excerpt', 'custom-fields', ),
		'taxonomies'            => array( 'category', 'post_tag', 'link_category' ),
		'hierarchical'          => false,
		'public'                => false,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 10,
		'menu_icon'             => 'dashicons-groups',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => false,
		'can_export'            => true,
		'has_archive'           => false,		
		'exclude_from_search'   => false,
		'publicly_queryable'    => false,
		'rewrite'               => $rewrite,
		'capabilities'          => $capabilities,
	);
	register_post_type( 'trial_sales', $args );

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