Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

properties

// Register Custom Post Type
function Property() {

	$labels = array(
		'name'                => _x( 'Properties', 'Post Type General Name', 'joinweb' ),
		'singular_name'       => _x( 'Property', 'Post Type Singular Name', 'joinweb' ),
		'menu_name'           => __( 'Properties', 'joinweb' ),
		'name_admin_bar'      => __( 'Properties', 'joinweb' ),
		'parent_item_colon'   => __( 'Parent Property:', 'joinweb' ),
		'all_items'           => __( 'All Properties', 'joinweb' ),
		'add_new_item'        => __( 'Add New Property', 'joinweb' ),
		'add_new'             => __( 'Add New', 'joinweb' ),
		'new_item'            => __( 'New Property', 'joinweb' ),
		'edit_item'           => __( 'Edit Property', 'joinweb' ),
		'update_item'         => __( 'Update Property', 'joinweb' ),
		'view_item'           => __( 'View Property', 'joinweb' ),
		'search_items'        => __( 'Search Properties', 'joinweb' ),
		'not_found'           => __( 'Not found', 'joinweb' ),
		'not_found_in_trash'  => __( 'Not found in Trash', 'joinweb' ),
	);
	$rewrite = array(
		'slug'                => 'property',
		'with_front'          => true,
		'pages'               => true,
		'feeds'               => true,
	);
	$args = array(
		'label'               => __( 'properties', 'joinweb' ),
		'description'         => __( 'Properties', 'joinweb' ),
		'labels'              => $labels,
		'supports'            => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'revisions', ),
		'hierarchical'        => false,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'menu_position'       => 5,
		'menu_icon'           => 'http://www.icon.com/icon.jpg',
		'show_in_admin_bar'   => true,
		'show_in_nav_menus'   => true,
		'can_export'          => true,
		'has_archive'         => true,
		'exclude_from_search' => false,
		'publicly_queryable'  => true,
		'query_var'           => 'property',
		'rewrite'             => $rewrite,
		'capability_type'     => 'page',
	);
	register_post_type( 'properties', $args );

}

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