Producto Vinca
if ( ! function_exists('vinca_product') ) {
// Register Custom Post Type
function vinca_product() {
$labels = array(
'name' => _x( 'Productos', 'Post Type General Name', 'vinca' ),
'singular_name' => _x( 'Producto', 'Post Type Singular Name', 'vinca' ),
'menu_name' => __( 'Producto', 'vinca' ),
'parent_item_colon' => __( 'Padre:', 'vinca' ),
'all_items' => __( 'Todos', 'vinca' ),
'view_item' => __( 'Ver', 'vinca' ),
'add_new_item' => __( 'Crear', 'vinca' ),
'add_new' => __( 'Añadir nuevo', 'vinca' ),
'edit_item' => __( 'Editar', 'vinca' ),
'update_item' => __( 'Actualizar', 'vinca' ),
'search_items' => __( 'Buscar', 'vinca' ),
'not_found' => __( 'No encontrado', 'vinca' ),
'not_found_in_trash' => __( 'No encontrado en la papelera', 'vinca' ),
);
$rewrite = array(
'slug' => 'producto',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => __( 'producto', 'vinca' ),
'description' => __( 'Catálogo de productos', 'vinca' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'custom-fields', 'page-attributes', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 20,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'page',
);
register_post_type( 'producto', $args );
}
// Hook into the 'init' action
add_action( 'init', 'vinca_product', 0 );
}