Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Ofertas

Ofertas de vuelos

if ( ! function_exists('Chollos_de_vuelos') ) {

// Register Custom Post Type
function Chollos_de_vuelos() {

	$labels = array(
		'name'                  => 'Vuelos',
		'singular_name'         => 'Vuelo',
		'menu_name'             => 'CHOLLOS Vuelos',
		'name_admin_bar'        => 'Chollos de Vuelos',
		'archives'              => 'Vuelos',
		'attributes'            => 'Atributos del chollo',
		'parent_item_colon'     => '',
		'all_items'             => 'Todos los chollos',
		'add_new_item'          => 'Añadir nuevo chollo',
		'add_new'               => 'Añadir nuevo',
		'new_item'              => 'Nuevo chollo',
		'edit_item'             => 'Editar chollo',
		'update_item'           => 'Actualizar chollo',
		'view_item'             => 'Ver chollo',
		'view_items'            => 'Ver chollo',
		'search_items'          => 'Buscar chollo',
		'not_found'             => 'Chollo no Encontrado',
		'not_found_in_trash'    => 'Chollo no encontrado en Papelera',
		'featured_image'        => 'Imagen destacada',
		'set_featured_image'    => 'Selecciona imagen destacada',
		'remove_featured_image' => 'Elimina imagen destacada',
		'use_featured_image'    => 'Utilizar como imagen destacada',
		'insert_into_item'      => 'Insertar en el chollo',
		'uploaded_to_this_item' => 'Actualizar en este chollo',
		'items_list'            => 'Listado de chollos',
		'items_list_navigation' => 'Navegar en el Listado de chollos',
		'filter_items_list'     => 'Filtrar Lista de chollos',
	);
	$rewrite = array(
		'slug'                  => 'post_type',
		'with_front'            => true,
		'pages'                 => true,
		'feeds'                 => true,
	);
	$args = array(
		'label'                 => 'Vuelo',
		'description'           => 'Ofertas de vuelos',
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats' ),
		'taxonomies'            => array( 'Vuelos', 'Hoteles' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'https://i.imgur.com/Qr2mfJP.png',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => true,
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'rewrite'               => $rewrite,
		'capability_type'       => 'post',
		'show_in_rest'          => true,
	);
	register_post_type( 'Vuelos', $args );

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

}