Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Arquitectos

CPT base para cargar y administrar arquitectos

if ( ! function_exists('knx_register_arquitecto') ) {

// Register Custom Post Type
function knx_register_arquitecto() {

	$labels = array(
		'name'                  => _x( 'Arquitectos', 'Post Type General Name', 'revista_plot' ),
		'singular_name'         => _x( 'Arquitecto', 'Post Type Singular Name', 'revista_plot' ),
		'menu_name'             => __( 'Arquitectos', 'revista_plot' ),
		'name_admin_bar'        => __( 'Arquitecto', 'revista_plot' ),
		'archives'              => __( 'Arquitecto Archivo', 'revista_plot' ),
		'attributes'            => __( 'Arquitecto Attributos', 'revista_plot' ),
		'parent_item_colon'     => __( 'Arquitecto padre:', 'revista_plot' ),
		'all_items'             => __( 'Todos los Arquitectos', 'revista_plot' ),
		'add_new_item'          => __( 'Agregar Arquitecto', 'revista_plot' ),
		'add_new'               => __( 'Agregar nuevo', 'revista_plot' ),
		'new_item'              => __( 'Nuevo Arquitecto', 'revista_plot' ),
		'edit_item'             => __( 'Editar Arquitecto', 'revista_plot' ),
		'update_item'           => __( 'Actualizar Arquitecto', 'revista_plot' ),
		'view_item'             => __( 'Ver Arquitecto', 'revista_plot' ),
		'view_items'            => __( 'Ver Arquitectos', 'revista_plot' ),
		'search_items'          => __( 'Buscar Arquitecto', 'revista_plot' ),
		'not_found'             => __( 'No encontrado', 'revista_plot' ),
		'not_found_in_trash'    => __( 'No encontrado en la papelera', 'revista_plot' ),
		'featured_image'        => __( 'Imagen destacada', 'revista_plot' ),
		'set_featured_image'    => __( 'Agregar imagen destacada', 'revista_plot' ),
		'remove_featured_image' => __( 'Borrar imagen destacada', 'revista_plot' ),
		'use_featured_image'    => __( 'Usar como imagen destacada', 'revista_plot' ),
		'insert_into_item'      => __( 'Insertar en Arquitecto', 'revista_plot' ),
		'uploaded_to_this_item' => __( 'Subir a este Arquitecto', 'revista_plot' ),
		'items_list'            => __( 'Lista de Arquitectos', 'revista_plot' ),
		'items_list_navigation' => __( 'Items list navigation', 'revista_plot' ),
		'filter_items_list'     => __( 'Filtrar Arquitectos', 'revista_plot' ),
	);
	$args = array(
		'label'                 => __( 'Arquitecto', 'revista_plot' ),
		'description'           => __( 'Gestión y administracion de arquitectos', 'revista_plot' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'custom-fields', ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-businessman',
		'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( 'arquitecto', $args );

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

}