Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

PLANTILLAS

if ( ! function_exists('herpark_plantillas_post_type') ) {

// Register Custom Post Type
function herpark_plantillas_post_type() {

	$labels = array(
		'name'                  => _x( 'Plantillas', 'Post Type General Name', 'herpark' ),
		'singular_name'         => _x( 'Plantillas', 'Post Type Singular Name', 'herpark' ),
		'menu_name'             => __( 'Plantillas', 'herpark' ),
		'name_admin_bar'        => __( 'Plantillas', 'herpark' ),
		'parent_item_colon'     => __( 'Plantillas superior:', 'herpark' ),
		'all_items'             => __( 'Todas las plantillas', 'herpark' ),
		'add_new_item'          => __( 'Añadir nueva plantilla', 'herpark' ),
		'add_new'               => __( 'Añadir nueva', 'herpark' ),
		'new_item'              => __( 'Nueva plantilla', 'herpark' ),
		'edit_item'             => __( 'Editar plantilla', 'herpark' ),
		'update_item'           => __( 'Actualizar plantilla', 'herpark' ),
		'view_item'             => __( 'Ver plantilla', 'herpark' ),
		'search_items'          => __( 'Buscar plantillas', 'herpark' ),
		'not_found'             => __( 'No se han encontrado resultados', 'herpark' ),
		'not_found_in_trash'    => __( 'No hay nada en la papelera', 'herpark' ),
		'items_list'            => __( 'Lista de plantillas', 'herpark' ),
		'items_list_navigation' => __( 'Navegación de lista de plantillas', 'herpark' ),
		'filter_items_list'     => __( 'Filtro de lista de plantillas', 'herpark' ),
	);
	$args = array(
		'label'                 => __( 'Plantillas', 'herpark' ),
		'description'           => __( 'Diferentes plantillas de la tienda', 'herpark' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'revisions', ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 20,
		'menu_icon'             => 'dashicons-store',
		'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( 'plantillas', $args );

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

}