Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Habitaciines

Habitaciones 1

// Register Custom Post Type
function alojamiento_cpx() {

	$labels = array(
		'name'                  => _x( 'habitaciones', 'Post Type General Name', 'alojamiento' ),
		'singular_name'         => _x( 'habitación', 'Post Type Singular Name', 'alojamiento' ),
		'menu_name'             => __( 'alojamientos', 'alojamiento' ),
		'name_admin_bar'        => __( 'Casas', 'alojamiento' ),
		'archives'              => __( 'habitaciones', 'alojamiento' ),
		'attributes'            => __( 'atributos de las habitaciones', 'alojamiento' ),
		'parent_item_colon'     => __( 'Casa completa', 'alojamiento' ),
		'all_items'             => __( 'todas las habitaciones', 'alojamiento' ),
		'add_new_item'          => __( 'agregar nueva habitación', 'alojamiento' ),
		'add_new'               => __( 'agregar nuevo', 'alojamiento' ),
		'new_item'              => __( 'nueva habitación', 'alojamiento' ),
		'edit_item'             => __( 'editar habitación', 'alojamiento' ),
		'update_item'           => __( 'actualizar habitación', 'alojamiento' ),
		'view_item'             => __( 'ver habitación', 'alojamiento' ),
		'view_items'            => __( 'ver habitación', 'alojamiento' ),
		'search_items'          => __( 'buscar habitación', 'alojamiento' ),
		'not_found'             => __( 'no encontrada', 'alojamiento' ),
		'not_found_in_trash'    => __( 'no encontrado en la papelera', 'alojamiento' ),
		'featured_image'        => __( 'imagen destacada', 'alojamiento' ),
		'set_featured_image'    => __( 'poner imagen destacada', 'alojamiento' ),
		'remove_featured_image' => __( 'Quitar imagen destacada', 'alojamiento' ),
		'use_featured_image'    => __( 'Usar como imagen destacada', 'alojamiento' ),
		'insert_into_item'      => __( 'insertar en la habitación', 'alojamiento' ),
		'uploaded_to_this_item' => __( 'actualizar en esta habitación', 'alojamiento' ),
		'items_list'            => __( 'Lista de habitaciones', 'alojamiento' ),
		'items_list_navigation' => __( 'Lista de navigación de las habitaciones', 'alojamiento' ),
		'filter_items_list'     => __( 'Lista de habitaciones filtradas', 'alojamiento' ),
	);
	$args = array(
		'label'                 => __( 'habitación', 'alojamiento' ),
		'description'           => __( 'tipo de habitaciones de renta', 'alojamiento' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'comments', 'revisions', 'custom-fields', '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( 'alojamiento', $args );

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