Productos Post Type (Imaginavi)
// Register Custom Post Type
function custom_products_post_type() {
$labels = array(
'name' => _x( 'Productos', 'Post Type General Name', 'lam_imaginavi' ),
'singular_name' => _x( 'Producto', 'Post Type Singular Name', 'lam_imaginavi' ),
'menu_name' => __( 'Productos', 'lam_imaginavi' ),
'name_admin_bar' => __( 'Producto', 'lam_imaginavi' ),
'archives' => __( 'Producto Archives', 'lam_imaginavi' ),
'attributes' => __( 'Producto Attributes', 'lam_imaginavi' ),
'parent_item_colon' => __( 'Parent Producto:', 'lam_imaginavi' ),
'all_items' => __( 'Todos los Productos', 'lam_imaginavi' ),
'add_new_item' => __( 'Añadir nuevo Producto', 'lam_imaginavi' ),
'add_new' => __( 'Añadir nuevo', 'lam_imaginavi' ),
'new_item' => __( 'Nuevo Producto', 'lam_imaginavi' ),
'edit_item' => __( 'Editar Producto', 'lam_imaginavi' ),
'update_item' => __( 'Actualizar Producto', 'lam_imaginavi' ),
'view_item' => __( 'Ver Producto', 'lam_imaginavi' ),
'view_items' => __( 'Ver Productos', 'lam_imaginavi' ),
'search_items' => __( 'Buscar Productos', 'lam_imaginavi' ),
'not_found' => __( 'Not found', 'lam_imaginavi' ),
'not_found_in_trash' => __( 'Not found in Trash', 'lam_imaginavi' ),
'featured_image' => __( 'Featured Image', 'lam_imaginavi' ),
'set_featured_image' => __( 'Set featured image', 'lam_imaginavi' ),
'remove_featured_image' => __( 'Remove featured image', 'lam_imaginavi' ),
'use_featured_image' => __( 'Use as featured image', 'lam_imaginavi' ),
'insert_into_item' => __( 'Insert into item', 'lam_imaginavi' ),
'uploaded_to_this_item' => __( 'Uploaded to this item', 'lam_imaginavi' ),
'items_list' => __( 'Items list', 'lam_imaginavi' ),
'items_list_navigation' => __( 'Items list navigation', 'lam_imaginavi' ),
'filter_items_list' => __( 'Filter items list', 'lam_imaginavi' ),
);
$args = array(
'label' => __( 'Producto', 'lam_imaginavi' ),
'description' => __( 'Producto de catálogo', 'lam_imaginavi' ),
'labels' => $labels,
'supports' => array( 'title' ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-products',
'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( 'product', $args );
}
add_action( 'init', 'custom_products_post_type', 0 );