Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Terrace Tower Office Space

// Register Custom Post Type
function office_space_post_type() {

	$labels = array(
		'name'                  => 'Office Spaces',
		'singular_name'         => 'Office Space',
		'menu_name'             => 'Office Spaces',
		'name_admin_bar'        => 'Office Space',
		'archives'              => 'Office Space Archives',
		'attributes'            => 'Office Space Attributes',
		'parent_item_colon'     => 'Parent Office Space',
		'all_items'             => 'All Office Spaces',
		'add_new_item'          => 'Add New Office Space',
		'add_new'               => 'Add New',
		'new_item'              => 'New Office Space',
		'edit_item'             => 'Edit Office Space',
		'update_item'           => 'Update Office Space',
		'view_item'             => 'View Office Space',
		'view_items'            => 'View Office Spaces',
		'search_items'          => 'Search Office Space',
		'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 office space',
		'uploaded_to_this_item' => 'Uploaded to this office space',
		'items_list'            => 'Office space list',
		'items_list_navigation' => 'Office space list navigation',
		'filter_items_list'     => 'Filter office space list',
	);
	$rewrite = array(
		'slug'                  => 'office-space',
		'with_front'            => true,
		'pages'                 => true,
		'feeds'                 => true,
	);
	$args = array(
		'label'                 => 'Office Space',
		'description'           => 'This is the office space custom post type.',
		'labels'                => $labels,
		'supports'              => array( 'title', 'revisions', 'custom-fields' ),
		'taxonomies'            => array( 'property' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-admin-multisite',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => false,
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'rewrite'               => $rewrite,
		'capability_type'       => 'page',
	);
	register_post_type( 'office_space', $args );

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