Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Viajes

if ( ! function_exists('voyage') ) {

// Register Custom Post Type
function voyage() {

	$labels = array(
		'name'                => _x( 'Viajes', 'Post Type General Name', 'gv-admin' ),
		'singular_name'       => _x( 'Viaje', 'Post Type Singular Name', 'gv-admin' ),
		'menu_name'           => __( 'Viajes', 'gv-admin' ),
		'name_admin_bar'      => __( 'Viajes', 'gv-admin' ),
		'parent_item_colon'   => __( 'Viaje padre', 'gv-admin' ),
		'all_items'           => __( 'Todos los Viajes', 'gv-admin' ),
		'add_new_item'        => __( 'Añadir Nuevo Viaje', 'gv-admin' ),
		'add_new'             => __( 'Añadir Nuevo', 'gv-admin' ),
		'new_item'            => __( 'Nuevo Viaje', 'gv-admin' ),
		'edit_item'           => __( 'Editar Viaje', 'gv-admin' ),
		'update_item'         => __( 'Actualizar Viaje', 'gv-admin' ),
		'view_item'           => __( 'Ver Viaje', 'gv-admin' ),
		'search_items'        => __( 'Buscar Viaje', 'gv-admin' ),
		'not_found'           => __( 'No encontrado', 'gv-admin' ),
		'not_found_in_trash'  => __( 'No encontrado en la papelera', 'gv-admin' ),
	);
	$rewrite = array(
		'slug'                => 'viajes',
		'with_front'          => true,
		'pages'               => true,
		'feeds'               => false,
	);
	$args = array(
		'label'               => __( 'voyage', 'gv-admin' ),
		'description'         => __( 'Viajes', 'gv-admin' ),
		'labels'              => $labels,
		'supports'            => array( 'title', 'editor', 'thumbnail', 'revisions', ),
		'taxonomies'          => array( 'zone' ),
		'hierarchical'        => false,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'menu_position'       => 10,
		'menu_icon'           => 'dashicons-admin-site',
		'show_in_admin_bar'   => true,
		'show_in_nav_menus'   => true,
		'can_export'          => true,
		'has_archive'         => false,
		'exclude_from_search' => false,
		'publicly_queryable'  => false,
		'query_var'           => 'voyage',
		'rewrite'             => $rewrite,
		'capability_type'     => 'page',
	);
	register_post_type( 'voyage', $args );

}

// Hook into the 'init' action
add_action( 'init', 'voyage', 0 );

}