Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

CPT Estructuras

if ( ! function_exists('cr_estructuras') ) {

// Register Custom Post Type
function cr_estructuras() {

	$labels = array(
		'name'                  => _x( 'Estructuras', 'Post Type General Name', 'cr_estructuras' ),
		'singular_name'         => _x( 'Estructura', 'Post Type Singular Name', 'cr_estructuras' ),
		'menu_name'             => __( 'Estructuras', 'cr_estructuras' ),
		'name_admin_bar'        => __( 'Estructuras', 'cr_estructuras' ),
		'archives'              => __( 'Estructuas Archivos', 'cr_estructuras' ),
		'attributes'            => __( 'Estructuras Atributos', 'cr_estructuras' ),
		'parent_item_colon'     => __( 'Registro Padre', 'cr_estructuras' ),
		'all_items'             => __( 'Todos los Registros', 'cr_estructuras' ),
		'add_new_item'          => __( 'Añadir Nuevo', 'cr_estructuras' ),
		'add_new'               => __( 'Añadir Nuevo', 'cr_estructuras' ),
		'new_item'              => __( 'Nuevo', 'cr_estructuras' ),
		'edit_item'             => __( 'Editar', 'cr_estructuras' ),
		'update_item'           => __( 'Actualizar', 'cr_estructuras' ),
		'view_item'             => __( 'Ver', 'cr_estructuras' ),
		'view_items'            => __( 'Ver todos', 'cr_estructuras' ),
		'search_items'          => __( 'Buscar', 'cr_estructuras' ),
		'not_found'             => __( 'No encontrado', 'cr_estructuras' ),
		'not_found_in_trash'    => __( 'No encontrado', 'cr_estructuras' ),
		'featured_image'        => __( 'Imagen Principal', 'cr_estructuras' ),
		'set_featured_image'    => __( 'Selecciona Imagen Principal', 'cr_estructuras' ),
		'remove_featured_image' => __( 'Eliminar Imagen Principal', 'cr_estructuras' ),
		'use_featured_image'    => __( 'Usar como Imagen Principal', 'cr_estructuras' ),
		'insert_into_item'      => __( 'Insertar', 'cr_estructuras' ),
		'uploaded_to_this_item' => __( 'Actualizar', 'cr_estructuras' ),
		'items_list'            => __( 'Listado', 'cr_estructuras' ),
		'items_list_navigation' => __( 'Listado de Navegación', 'cr_estructuras' ),
		'filter_items_list'     => __( 'Filtros', 'cr_estructuras' ),
	);
	$args = array(
		'label'                 => __( 'Estructura', 'cr_estructuras' ),
		'description'           => __( 'Estructuras', 'cr_estructuras' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'revisions', 'custom-fields', 'page-attributes', ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-exerpt-view',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => true,		
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'capability_type'       => 'page',
	);
	register_post_type( 'cr_estructuras', $args );

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

}