Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

CPT Adv

// Register Custom Post Type
function cpt_adv() {

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

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