Función entrdas de Ofertas
Función que permite el custom post de Ofertas.
// Register Custom Post Type
function post_ofertas() {
$labels = array(
'name' => _x( 'Ofertas', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Oferta', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Ofertas', 'text_domain' ),
'name_admin_bar' => __( 'Ofertas', 'text_domain' ),
'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),
'all_items' => __( 'Todas las ofertas', 'text_domain' ),
'add_new_item' => __( 'Añadir nueva oferta', 'text_domain' ),
'add_new' => __( 'Añadir nueva', 'text_domain' ),
'new_item' => __( 'Nueva oferta', 'text_domain' ),
'edit_item' => __( 'Editar oferta', 'text_domain' ),
'update_item' => __( 'Actualizar oferta', 'text_domain' ),
'view_item' => __( 'Ver oferta', 'text_domain' ),
'search_items' => __( 'Buscar oferta', 'text_domain' ),
'not_found' => __( 'No encontrado', 'text_domain' ),
'not_found_in_trash' => __( 'No encontrado en la papelera', 'text_domain' ),
'items_list' => __( 'Lista de ofertas', 'text_domain' ),
'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),
'filter_items_list' => __( 'Filter items list', 'text_domain' ),
);
$args = array(
'label' => __( 'Oferta', 'text_domain' ),
'description' => __( 'Publicación de ofertas.', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'comments', 'revisions', 'page-attributes', 'post-formats', ),
'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,
'query_var' => 'ofertas',
'capability_type' => 'page',
);
register_post_type( 'ofertas', $args );
}
add_action( 'init', 'post_ofertas', 0 );