Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Galeria Kinder miss Lizzy

custom post type para crear la galeria en el home de kinder miss lizzy

if ( ! function_exists('jean_custom_post') ) {

// Register Custom Post Type
function jean_custom_post() {

	$labels = array(
		'name'                  => _x( 'Fotos Galería', 'Post Type General Name', 'text_domain' ),
		'singular_name'         => _x( 'Foto Galería', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'             => __( 'Galería de Fotos', 'text_domain' ),
		'name_admin_bar'        => __( 'Fotos galería', 'text_domain' ),
		'archives'              => __( 'Foto Archives', 'text_domain' ),
		'attributes'            => __( 'Foto Attributes', 'text_domain' ),
		'parent_item_colon'     => __( 'Parent Item:', 'text_domain' ),
		'all_items'             => __( 'Todas las fotos', 'text_domain' ),
		'add_new_item'          => __( 'Agrega nueva foto', 'text_domain' ),
		'add_new'               => __( 'Agrega nueva', 'text_domain' ),
		'new_item'              => __( 'Nueva foto', 'text_domain' ),
		'edit_item'             => __( 'Editar foto', 'text_domain' ),
		'update_item'           => __( 'Actualizar foto', 'text_domain' ),
		'view_item'             => __( 'Ver foto', 'text_domain' ),
		'view_items'            => __( 'Ver fotos', 'text_domain' ),
		'search_items'          => __( 'Buscar foto', 'text_domain' ),
		'not_found'             => __( 'No encontrado', 'text_domain' ),
		'not_found_in_trash'    => __( 'No encontrado en papelera', 'text_domain' ),
		'featured_image'        => __( 'Foto destacada', 'text_domain' ),
		'set_featured_image'    => __( 'usar como foto destacada', 'text_domain' ),
		'remove_featured_image' => __( 'Remover foto destacada', 'text_domain' ),
		'use_featured_image'    => __( 'Usar como imagen destacada', 'text_domain' ),
		'insert_into_item'      => __( 'Insertar en foto', 'text_domain' ),
		'uploaded_to_this_item' => __( 'Cargado a esta foto', 'text_domain' ),
		'items_list'            => __( 'Lista de fotos', 'text_domain' ),
		'items_list_navigation' => __( 'Lista navegación fotos', 'text_domain' ),
		'filter_items_list'     => __( 'Filtro lista de fotos', 'text_domain' ),
	);
	$args = array(
		'label'                 => __( 'Foto Galería', 'text_domain' ),
		'description'           => __( 'Fotos que aparecen en la galería del home', 'text_domain' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail' ),
		'taxonomies'            => array( 'eventos', ' actividades' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-images-alt2',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => false,
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'capability_type'       => 'post',
		'show_in_rest'          => true,
		'rest_base'             => 'jean/rest_route',
	);
	register_post_type( 'jean_galeria_lizzy', $args );

}
add_action( 'init', 'jean_custom_post', 0 );

}