Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Modelos Optimiza

// Register Custom Post Type
function post_modelos() {

	$labels = array(
		'name'                  => _x( 'modelos', 'Post Type General Name', 'text_domain' ),
		'singular_name'         => _x( 'modelo', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'             => __( 'Modelos', 'text_domain' ),
		'name_admin_bar'        => __( 'Modelos', 'text_domain' ),
		'archives'              => __( 'Archivos', 'text_domain' ),
		'attributes'            => __( 'Atributos del modelo', 'text_domain' ),
		'parent_item_colon'     => __( 'elemento principal:', 'text_domain' ),
		'all_items'             => __( 'Todos los modelos', 'text_domain' ),
		'add_new_item'          => __( 'Añadir nuevo modelo', 'text_domain' ),
		'add_new'               => __( 'Añadir nuevo', 'text_domain' ),
		'new_item'              => __( 'Nuevo modelo', 'text_domain' ),
		'edit_item'             => __( 'Editar modelo', 'text_domain' ),
		'update_item'           => __( 'Actuaizar modelo', 'text_domain' ),
		'view_item'             => __( 'Ver modelo', 'text_domain' ),
		'view_items'            => __( 'ver modelo', 'text_domain' ),
		'search_items'          => __( 'Buscar modelo', 'text_domain' ),
		'not_found'             => __( 'Modelo no encontrado', 'text_domain' ),
		'not_found_in_trash'    => __( 'No hay modelos en la papelera', 'text_domain' ),
		'featured_image'        => __( 'Imagen del modelo', 'text_domain' ),
		'set_featured_image'    => __( 'Establecer imagen del modelo', 'text_domain' ),
		'remove_featured_image' => __( 'Eliminar imagen del modelo', 'text_domain' ),
		'use_featured_image'    => __( 'Utilizar como imagen del modelo', 'text_domain' ),
		'insert_into_item'      => __( 'Insertar dentro del modelo', 'text_domain' ),
		'uploaded_to_this_item' => __( 'Subido a este modelo', 'text_domain' ),
		'items_list'            => __( 'Lista de modelos', 'text_domain' ),
		'items_list_navigation' => __( 'Lista de barra de navegación', 'text_domain' ),
		'filter_items_list'     => __( 'Filtar lista de proyectos', 'text_domain' ),
	);
	$args = array(
		'label'                 => __( 'modelo', 'text_domain' ),
		'description'           => __( 'modelos disponibles en el proyecto', 'text_domain' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'revisions' ),
		'taxonomies'            => array( 'baños', ' rango de precios', ' ciudad' ),
		'hierarchical'          => true,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-category',
		'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',
		'show_in_rest'          => true,
	);
	register_post_type( 'post_modelos', $args );

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