Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Azura Home CPT

Azura homes custom post type

// Register Custom Post Type
function azura_homes_post_type() {

	$labels = array(
		'name'                => _x( 'Azura Homes', 'Post Type General Name', 'azura_panama' ),
		'singular_name'       => _x( 'Azura Home', 'Post Type Singular Name', 'azura_panama' ),
		'menu_name'           => __( 'Azura Homes', 'azura_panama' ),
		'parent_item_colon'   => __( 'Parent Home:', 'azura_panama' ),
		'all_items'           => __( 'All Homes', 'azura_panama' ),
		'view_item'           => __( 'View Home', 'azura_panama' ),
		'add_new_item'        => __( 'Add New Home', 'azura_panama' ),
		'add_new'             => __( 'Add New', 'azura_panama' ),
		'edit_item'           => __( 'Edit Home', 'azura_panama' ),
		'update_item'         => __( 'Update Home', 'azura_panama' ),
		'search_items'        => __( 'Search Home', 'azura_panama' ),
		'not_found'           => __( 'Not found', 'azura_panama' ),
		'not_found_in_trash'  => __( 'Not found in Trash', 'azura_panama' ),
	);
	$args = array(
		'label'               => __( 'azura_homes', 'azura_panama' ),
		'description'         => __( 'The Homes available at Azura Panama', 'azura_panama' ),
		'labels'              => $labels,
		'supports'            => array( 'title', 'editor', 'excerpt', 'thumbnail', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats', ),
		'taxonomies'          => array( 'category', 'post_tag' ),
		'hierarchical'        => false,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'show_in_nav_menus'   => true,
		'show_in_admin_bar'   => true,
		'menu_position'       => 20,
		'menu_icon'           => '',
		'can_export'          => true,
		'has_archive'         => true,
		'exclude_from_search' => false,
		'publicly_queryable'  => true,
		'capability_type'     => 'page',
	);
	register_post_type( 'azura_homes', $args );

}

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