Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

ng_surveyrequest

// Register Custom Post Type
function ng_surveyrequest_cpt() {

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

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