Testimonio Post Type
// Register Custom Post Type
function testimonio_post_type() {
$labels = array(
'name' => _x( 'Testimonios', 'Post Type General Name', 'testimonio_domain' ),
'singular_name' => _x( 'Testimonio', 'Post Type Singular Name', 'testimonio_domain' ),
'menu_name' => __( 'Testimonios', 'testimonio_domain' ),
'name_admin_bar' => __( 'Testimonios', 'testimonio_domain' ),
'archives' => __( 'Archivo testimonio', 'testimonio_domain' ),
'attributes' => __( 'Atributos testimonio', 'testimonio_domain' ),
'parent_item_colon' => __( 'Testimonio padre:', 'testimonio_domain' ),
'all_items' => __( 'Todos', 'testimonio_domain' ),
'add_new_item' => __( 'Añadir nuevo testimonio', 'testimonio_domain' ),
'add_new' => __( 'Añadir', 'testimonio_domain' ),
'new_item' => __( 'Nuevo', 'testimonio_domain' ),
'edit_item' => __( 'Editar', 'testimonio_domain' ),
'update_item' => __( 'Actualizar', 'testimonio_domain' ),
'view_item' => __( 'Ver testimonio', 'testimonio_domain' ),
'view_items' => __( 'Ver testimonios', 'testimonio_domain' ),
'search_items' => __( 'Buscar testimonio', 'testimonio_domain' ),
'not_found' => __( 'No encontrado', 'testimonio_domain' ),
'not_found_in_trash' => __( 'No encontrado en la papelera', 'testimonio_domain' ),
'featured_image' => __( 'Imagen destacada', 'testimonio_domain' ),
'set_featured_image' => __( 'Asignar imagen destacada', 'testimonio_domain' ),
'remove_featured_image' => __( 'Remover imagen', 'testimonio_domain' ),
'use_featured_image' => __( 'Usar como imagen destacada', 'testimonio_domain' ),
'insert_into_item' => __( 'Insertar en testimonio', 'testimonio_domain' ),
'uploaded_to_this_item' => __( 'Subir a testimonio', 'testimonio_domain' ),
'items_list' => __( 'Lista testimonio', 'testimonio_domain' ),
'items_list_navigation' => __( 'Navegación testimonio', 'testimonio_domain' ),
'filter_items_list' => __( 'Filtro testimonios', 'testimonio_domain' ),
);
$rewrite = array(
'slug' => 'testimonio',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => __( 'Testimonio', 'testimonio_domain' ),
'description' => __( 'Testimonios Sobrenaturales', 'testimonio_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail' ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-testimonial',
'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' => 'page',
'show_in_rest' => true,
);
register_post_type( 'testimonio_post_type', $args );
}
add_action( 'init', 'testimonio_post_type', 0 );