Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Associates

// Register Custom Post Type
function create_associates_custom_post_type() {

	$labels = array(
		'name'                  => 'Associates',
		'singular_name'         => 'Associate',
		'menu_name'             => 'Associates',
		'name_admin_bar'        => 'Associates',
		'archives'              => 'Associates Archives',
		'attributes'            => 'Associates Attributes',
		'parent_item_colon'     => 'Parent Item: Associates',
		'all_items'             => 'All Associates',
		'add_new_item'          => 'Add New Associates',
		'add_new'               => 'Add New Associate',
		'new_item'              => 'New Associates',
		'edit_item'             => 'Edit Associates',
		'update_item'           => 'Update Associates',
		'view_item'             => 'View Associates',
		'view_items'            => 'View Associates',
		'search_items'          => 'Search Associates',
		'not_found'             => 'Not found',
		'not_found_in_trash'    => 'Not found in Trash',
		'featured_image'        => 'Featured Image',
		'set_featured_image'    => 'Set featured image',
		'remove_featured_image' => 'Remove featured image',
		'use_featured_image'    => 'Use as featured image',
		'insert_into_item'      => 'Insert into item',
		'uploaded_to_this_item' => 'Uploaded to this item',
		'items_list'            => 'Items list',
		'items_list_navigation' => 'Items list navigation',
		'filter_items_list'     => 'Filter items list',
	);
	$args = array(
		'label'                 => 'Associate',
		'description'           => 'Associates',
		'labels'                => $labels,
		'supports'              => array( 'title', 'thumbnail', 'revisions', ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-universal-access-alt',
		'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',
		'show_in_rest'          => true,
	);
	register_post_type( 'associates_post_type', $args );

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