Productos
if ( ! function_exists('lmgh_productos_post_type') ) {
// Register Custom Post Type
function lmgh_productos_post_type() {
$labels = array(
'name' => _x( 'Productos', 'Post Type General Name', 'lmgh' ),
'singular_name' => _x( 'Producto', 'Post Type Singular Name', 'lmgh' ),
'menu_name' => __( 'Productos', 'lmgh' ),
'parent_item_colon' => __( 'Superior', 'lmgh' ),
'all_items' => __( 'Todos los productos', 'lmgh' ),
'view_item' => __( 'Ver producto', 'lmgh' ),
'add_new_item' => __( 'Agregar nuevo producto', 'lmgh' ),
'add_new' => __( 'Agregar nuevo', 'lmgh' ),
'edit_item' => __( 'Editar producto', 'lmgh' ),
'update_item' => __( 'Actulaizar producto', 'lmgh' ),
'search_items' => __( 'Buscar Productos', 'lmgh' ),
'not_found' => __( 'No se han encontrado resultados', 'lmgh' ),
'not_found_in_trash' => __( 'No hay productos en la papelera', 'lmgh' ),
);
$rewrite = array(
'slug' => 'productos',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => __( 'productos', 'lmgh' ),
'description' => __( 'Catálogo de productos', 'lmgh' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => false,
'show_in_admin_bar' => true,
'menu_position' => 20,
'menu_icon' => '',
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => true,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'page',
);
register_post_type( 'productos', $args );
}
// Hook into the 'init' action
add_action( 'init', 'lmgh_productos_post_type', 0 );
}