Habitaciones
if ( ! function_exists('habitacionesycasitas') ) {
// Register Custom Post Type
function habitacionesycasitas() {
$labels = array(
'name' => 'habitaciones',
'singular_name' => 'habitacion',
'menu_name' => 'Habitacion',
'name_admin_bar' => 'Habitacion',
'archives' => 'Archivos',
'attributes' => 'Atributos',
'parent_item_colon' => 'Trabajo padre:',
'all_items' => 'Todas los trabajos',
'add_new_item' => 'Añadir un nuevo trabajo',
'add_new' => 'Añadir nuevo',
'new_item' => 'Nuevo trabajo',
'edit_item' => 'Editar trabajo',
'update_item' => 'Actualizar trabajo',
'view_item' => 'Ver trabajo',
'view_items' => 'Ver trabajos',
'search_items' => 'Buscar trabajos',
'not_found' => 'No encontrado',
'not_found_in_trash' => 'No encontrado en la papelera',
'featured_image' => 'Imagen destacada',
'set_featured_image' => 'Fijar imagen destacada',
'remove_featured_image' => 'Quitar imagen destacada',
'use_featured_image' => 'Usar como imagen destacada',
'insert_into_item' => 'Insertar en el trabajo',
'uploaded_to_this_item' => 'Subido a este trabajo',
'items_list' => 'Lista de trabajos',
'items_list_navigation' => 'Navegacion de la lista de trabajos',
'filter_items_list' => 'Filtrar la lista de trabajos',
);
$args = array(
'label' => 'habitacion',
'description' => 'Post de habitaciones',
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail' ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-archive',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => true,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'habita', $args );
}
add_action( 'init', 'habitacionesycasitas', 0 );
}