CPT-Cursos
Agregar nuevas entradas de cursos
// Register Custom Post Type function cursos_post_type() { $labels = array( 'name' => _x( 'Cursos', 'Post Type General Name', 'valentin-domain' ), 'singular_name' => _x( 'Curso', 'Post Type Singular Name', 'valentin-domain' ), 'menu_name' => __( 'Curso', 'valentin-domain' ), 'name_admin_bar' => __( 'Curso', 'valentin-domain' ), 'archives' => __( 'Archivo de Cursos', 'valentin-domain' ), 'attributes' => __( 'Atributos', 'valentin-domain' ), 'parent_item_colon' => __( 'Curso Padre', 'valentin-domain' ), 'all_items' => __( 'Todos los Cursos', 'valentin-domain' ), 'add_new_item' => __( 'Agregar nuevo Curso', 'valentin-domain' ), 'add_new' => __( 'Agregar Curso', 'valentin-domain' ), 'new_item' => __( 'Nuevo Curso', 'valentin-domain' ), 'edit_item' => __( 'Editar Curso', 'valentin-domain' ), 'update_item' => __( 'Acutalizar Curso', 'valentin-domain' ), 'view_item' => __( 'Ver Curso', 'valentin-domain' ), 'view_items' => __( 'Ver Cursos', 'valentin-domain' ), 'search_items' => __( 'Bsucar Cursos', 'valentin-domain' ), 'not_found' => __( 'No encontrado', 'valentin-domain' ), 'not_found_in_trash' => __( 'No encontrado en papelera', 'valentin-domain' ), 'featured_image' => __( 'Imagen Destacada', 'valentin-domain' ), 'set_featured_image' => __( 'Set Como Imagen Destacada', 'valentin-domain' ), 'remove_featured_image' => __( 'Remover Imagen Destacada', 'valentin-domain' ), 'use_featured_image' => __( 'Usar Como Imagen Destacada', 'valentin-domain' ), 'insert_into_item' => __( 'Insertar en Curso', 'valentin-domain' ), 'uploaded_to_this_item' => __( 'Subir a Cursos', 'valentin-domain' ), 'items_list' => __( 'Listar Cursos', 'valentin-domain' ), 'items_list_navigation' => __( 'Listar Cursos en el Navegador', 'valentin-domain' ), 'filter_items_list' => __( 'Fistrar lista de Cursos', 'valentin-domain' ), ); $rewrite = array( 'slug' => 'cursos', 'with_front' => true, 'pages' => true, 'feeds' => true, ); $args = array( 'label' => __( 'Curso', 'valentin-domain' ), 'description' => __( 'Crear nuevas entradas para cursos', 'valentin-domain' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'revisions', 'custom-fields', 'post-formats' ), 'taxonomies' => array( 'category', 'post_tag' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-calendar-alt', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'post', ); register_post_type( 'cursos_type', $args ); } add_action( 'init', 'cursos_post_type', 0 );