Libreria online
if ( ! function_exists('libros_post_type') ) {
// Register Custom Post Type
function libros_post_type() {
$labels = array(
'name' => _x( 'LIbros', 'Post Type General Name', 'amk' ),
'singular_name' => _x( 'Libro', 'Post Type Singular Name', 'amk' ),
'menu_name' => __( 'Libros', 'amk' ),
'parent_item_colon' => __( 'Superior', 'amk' ),
'all_items' => __( 'Todos los Libros', 'amk' ),
'view_item' => __( 'Ver LIbro', 'amk' ),
'add_new_item' => __( 'Añadir Nuevo Libro ', 'amk' ),
'add_new' => __( 'Nuevo LIbro', 'amk' ),
'edit_item' => __( 'Editar', 'amk' ),
'update_item' => __( 'Actualizar', 'amk' ),
'search_items' => __( 'Buscar LIbro', 'amk' ),
'not_found' => __( 'Libro No Encontrado', 'amk' ),
'not_found_in_trash' => __( 'No hay nada ', 'amk' ),
);
$args = array(
'label' => __( 'Libros', 'amk' ),
'description' => __( 'Libros de la Biblioteca', 'amk' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'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' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'Libros', $args );
}
// Hook into the 'init' action
add_action( 'init', 'libros_post_type', 0 );
}