Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Slider Home

Slider principal

if ( ! function_exists('fw_home_slider_post_type') ) {

// Register Custom Post Type
function fw_home_slider_post_type() {

	$labels = array(
		'name'                => _x( 'Sliders', 'Post Type General Name', 'text_domain' ),
		'singular_name'       => _x( 'Slider', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'           => __( 'Slider Principal', 'text_domain' ),
		'name_admin_bar'      => __( 'Slider Principal', 'text_domain' ),
		'parent_item_colon'   => __( 'Parent Item:', 'text_domain' ),
		'all_items'           => __( 'Todos', 'text_domain' ),
		'add_new_item'        => __( 'Nuevo', 'text_domain' ),
		'add_new'             => __( 'Nuevo', 'text_domain' ),
		'new_item'            => __( 'Nuevo', 'text_domain' ),
		'edit_item'           => __( 'Editar', 'text_domain' ),
		'update_item'         => __( 'Actualizar', 'text_domain' ),
		'view_item'           => __( 'Ver', 'text_domain' ),
		'search_items'        => __( 'Buscar', 'text_domain' ),
		'not_found'           => __( 'No encontrado', 'text_domain' ),
		'not_found_in_trash'  => __( 'No está en la papelera', 'text_domain' ),
	);
	$args = array(
		'label'               => __( 'home_slider', 'text_domain' ),
		'description'         => __( 'Slider Principal', 'text_domain' ),
		'labels'              => $labels,
		'supports'            => array( 'title', 'thumbnail', ),
		'hierarchical'        => false,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'menu_position'       => 20,
		'menu_icon'           => 'dashicons-format-gallery',
		'show_in_admin_bar'   => true,
		'show_in_nav_menus'   => true,
		'can_export'          => true,
		'has_archive'         => true,
		'exclude_from_search' => true,
		'publicly_queryable'  => true,
		'capability_type'     => 'page',
	);
	register_post_type( 'home_slider', $args );

}

// Hook into the 'init' action
add_action( 'init', 'fw_home_slider_post_type', 0 );

}