Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Real Estate

Custom Post Type for Real Estate

// Register Custom Post Type
function custom_post_type_listings() {

	$labels = array(
		'name'                  => 'Listings',
		'singular_name'         => 'Listing',
		'menu_name'             => 'Listings',
		'name_admin_bar'        => 'Listing',
		'archives'              => 'Listing Archives',
		'parent_item_colon'     => 'Parent Listing:',
		'all_items'             => 'All Listings',
		'add_new_item'          => 'Add New Listing',
		'add_new'               => 'Add New',
		'new_item'              => 'New Listing',
		'edit_item'             => 'Edit Listing',
		'update_item'           => 'Update Listing',
		'view_item'             => 'View Listing',
		'search_items'          => 'Search Listing',
		'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 Listing',
		'uploaded_to_this_item' => 'Uploaded to this Listing',
		'items_list'            => 'Listings list',
		'items_list_navigation' => 'Listings list navigation',
		'filter_items_list'     => 'Filter Listings list',
	);
	$args = array(
		'label'                 => 'Listing',
		'labels'                => $labels,
		'supports'              => array( 'title', 'author', 'thumbnail', 'revisions', 'page-attributes', ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'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',
	);
	register_post_type( 'listing', $args );

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