Productos IMEG
if ( ! function_exists('custom_post_type_productos') ) {
// Register Custom Post Type
function custom_post_type_productos() {
$labels = array(
'name' => _x( 'Productos', 'Post Type General Name', 'text_imeg' ),
'singular_name' => _x( 'Producto', 'Post Type Singular Name', 'text_imeg' ),
'menu_name' => __( 'Productos', 'text_imeg' ),
'name_admin_bar' => __( 'Productos', 'text_imeg' ),
'archives' => __( 'Productos Archives', 'text_imeg' ),
'attributes' => __( 'Atributos del producto', 'text_imeg' ),
'parent_item_colon' => __( 'Parent Productos:', 'text_imeg' ),
'all_items' => __( 'Todos los productos', 'text_imeg' ),
'add_new_item' => __( 'Añadir un nuevo producto', 'text_imeg' ),
'add_new' => __( 'Añadir nuevo', 'text_imeg' ),
'new_item' => __( 'Nuevo producto', 'text_imeg' ),
'edit_item' => __( 'Editar producto', 'text_imeg' ),
'update_item' => __( 'Actualizar producto', 'text_imeg' ),
'view_item' => __( 'Ver producto', 'text_imeg' ),
'view_items' => __( 'Ver productos', 'text_imeg' ),
'search_items' => __( 'Buscar producto', 'text_imeg' ),
'not_found' => __( 'No encontado', 'text_imeg' ),
'not_found_in_trash' => __( 'No encontrado en la papelera', 'text_imeg' ),
'featured_image' => __( 'Imágen del producto', 'text_imeg' ),
'set_featured_image' => __( 'Establecer imágen del producto', 'text_imeg' ),
'remove_featured_image' => __( 'Eliminar imagen del producto', 'text_imeg' ),
'use_featured_image' => __( 'Usar como iágen del producto', 'text_imeg' ),
'insert_into_item' => __( 'Inserta en el producto', 'text_imeg' ),
'uploaded_to_this_item' => __( 'Actualizar para dicho producto', 'text_imeg' ),
'items_list' => __( 'Lista de productos', 'text_imeg' ),
'items_list_navigation' => __( 'Lista de navegación de productos', 'text_imeg' ),
'filter_items_list' => __( 'Filtro para la lista de productos', 'text_imeg' ),
);
$args = array(
'label' => __( 'Producto', 'text_imeg' ),
'description' => __( 'Productos suministrados', 'text_imeg' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields' ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-cart',
'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',
'show_in_rest' => false,
);
register_post_type( 'productos', $args );
}
add_action( 'init', 'custom_post_type_productos', 0 );
}