Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

client post type

// Register Custom Post Type
function project_post_type() {

	$labels = array(
		'name'                => _x( 'Projects', 'Post Type General Name', 'ctrl' ),
		'singular_name'       => _x( 'Project', 'Post Type Singular Name', 'ctrl' ),
		'menu_name'           => __( 'Projects', 'ctrl' ),
		'parent_item_colon'   => __( 'Parent Project:', 'ctrl' ),
		'all_items'           => __( 'All Projects', 'ctrl' ),
		'view_item'           => __( 'View Project', 'ctrl' ),
		'add_new_item'        => __( 'Add New Project', 'ctrl' ),
		'add_new'             => __( 'Add New', 'ctrl' ),
		'edit_item'           => __( 'Edit Projects', 'ctrl' ),
		'update_item'         => __( 'Update Project', 'ctrl' ),
		'search_items'        => __( 'Search Projects', 'ctrl' ),
		'not_found'           => __( 'Not found', 'ctrl' ),
		'not_found_in_trash'  => __( 'Not found in Trash', 'ctrl' ),
	);
	$rewrite = array(
		'slug'                => 'projects',
		'with_front'          => true,
		'pages'               => true,
		'feeds'               => true,
	);
	$capabilities = array(
		'edit_post'           => 'edit_post',
		'read_post'           => 'read_post',
		'delete_post'         => 'delete_post',
		'edit_posts'          => 'edit_posts',
		'edit_others_posts'   => 'edit_others_posts',
		'publish_posts'       => 'publish_posts',
		'read_private_posts'  => 'read_private_posts',
	);
	$args = array(
		'label'               => __( 'project_posts', 'ctrl' ),
		'description'         => __( 'Projects', 'ctrl' ),
		'labels'              => $labels,
		'supports'            => array( 'title', ),
		'hierarchical'        => true,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'show_in_nav_menus'   => true,
		'show_in_admin_bar'   => true,
		'menu_position'       => 5,
		'menu_icon'           => 'dashicons-admin-users',
		'can_export'          => true,
		'has_archive'         => true,
		'exclude_from_search' => false,
		'publicly_queryable'  => true,
		'query_var'           => 'project_type',
		'rewrite'             => $rewrite,
		'capabilities'        => $capabilities,
	);
	register_post_type( 'project_posts', $args );

}

// Hook into the 'init' action
add_action( 'init', 'project_post_type', 0 );