CPT Lotes
Lotes para desarrollos inmobiliarios
if ( ! function_exists('ioc_cpt_lotes') ) { // Register Custom Post Type function ioc_cpt_lotes() { $labels = array( 'name' => _x( 'Lotes', 'Post Type General Name', 'ioc' ), 'singular_name' => _x( 'Lote', 'Post Type Singular Name', 'ioc' ), 'menu_name' => __( 'Lotes', 'ioc' ), 'name_admin_bar' => __( 'Lote', 'ioc' ), 'archives' => __( 'Archivo de lotes', 'ioc' ), 'attributes' => __( 'Atributos del lote', 'ioc' ), 'parent_item_colon' => __( 'Lote padre', 'ioc' ), 'all_items' => __( 'Todos los lotes', 'ioc' ), 'add_new_item' => __( 'Añadir Nuevo Lote', 'ioc' ), 'add_new' => __( 'Añadir Nuevo', 'ioc' ), 'new_item' => __( 'Nuevo Lote', 'ioc' ), 'edit_item' => __( 'Editar Lote', 'ioc' ), 'update_item' => __( 'Actualizar Lote', 'ioc' ), 'view_item' => __( 'Ver Lote', 'ioc' ), 'view_items' => __( 'Ver Lotes', 'ioc' ), 'search_items' => __( 'Buscar Lote', 'ioc' ), 'not_found' => __( 'No encontrado', 'ioc' ), 'not_found_in_trash' => __( 'No encontrado en papelera', 'ioc' ), 'featured_image' => __( 'Imagen Destacads', 'ioc' ), 'set_featured_image' => __( 'Asignar Imagen Destacada', 'ioc' ), 'remove_featured_image' => __( 'Eliminar Imagen Destacada', 'ioc' ), 'use_featured_image' => __( 'Usar como imagen destacada', 'ioc' ), 'insert_into_item' => __( 'Insertar en Lote', 'ioc' ), 'uploaded_to_this_item' => __( 'Subido a este Lote', 'ioc' ), 'items_list' => __( 'Lista de Lotes', 'ioc' ), 'items_list_navigation' => __( 'Navegación de Lista de Lotes', 'ioc' ), 'filter_items_list' => __( 'Filtrar Lista de Lotes', 'ioc' ), ); $args = array( 'label' => __( 'Lote', 'ioc' ), 'description' => __( 'Dar de alta lotes (terrenos o residencias) dentro de un desarrollo', 'ioc' ), 'labels' => $labels, 'supports' => array( 'title', 'editor' ), 'taxonomies' => array( 'modificadores' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-admin-home', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => 'lotes', 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', 'show_in_rest' => true, ); register_post_type( 'lote', $args ); } add_action( 'init', 'ioc_cpt_lotes', 0 ); }