Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Servicios

// Register Custom Post Type
function cpt_servicios() {

	$labels = array(
		'name'                  => _x( 'Servicios', 'Post Type General Name', 'text_domain' ),
		'singular_name'         => _x( 'Servicio', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'             => __( 'Servicios', 'text_domain' ),
		'name_admin_bar'        => __( 'Añadir Nuevo', 'text_domain' ),
		'archives'              => __( 'Archivos de Servicios', 'text_domain' ),
		'attributes'            => __( 'Atributos de Servicio', 'text_domain' ),
		'parent_item_colon'     => __( 'Servicio Padre:', 'text_domain' ),
		'all_items'             => __( 'Todos los Servicios', 'text_domain' ),
		'add_new_item'          => __( 'Añadir Nuevo Servicio', 'text_domain' ),
		'add_new'               => __( 'Añadir Nuevo', 'text_domain' ),
		'new_item'              => __( 'Nuevo Servicio', 'text_domain' ),
		'edit_item'             => __( 'Editar Servicio', 'text_domain' ),
		'update_item'           => __( 'Actualizar Servicio', 'text_domain' ),
		'view_item'             => __( 'Ver Servicio', 'text_domain' ),
		'view_items'            => __( 'Ver Servicios', 'text_domain' ),
		'search_items'          => __( 'Buscar Servicio', 'text_domain' ),
		'not_found'             => __( 'No Encontrado', 'text_domain' ),
		'not_found_in_trash'    => __( 'No encontrado en la Papelera', 'text_domain' ),
		'featured_image'        => __( 'Imagen Destacada de Servicio', 'text_domain' ),
		'set_featured_image'    => __( 'Configurar Imagen Destacada', 'text_domain' ),
		'remove_featured_image' => __( 'Borrar Imagen Destacada', 'text_domain' ),
		'use_featured_image'    => __( 'Usar como Imagen Destacada', 'text_domain' ),
		'insert_into_item'      => __( 'Insertar en el Servicio', 'text_domain' ),
		'uploaded_to_this_item' => __( 'Subida a este Servicio', 'text_domain' ),
		'items_list'            => __( 'Lista de Servicios', 'text_domain' ),
		'items_list_navigation' => __( 'Navegación por Lista de Servicios', 'text_domain' ),
		'filter_items_list'     => __( 'Filtrar Lista de Servicios', 'text_domain' ),
	);
	$rewrite = array(
		'slug'                  => 'servicio',
		'with_front'            => true,
		'pages'                 => true,
		'feeds'                 => true,
	);
	$args = array(
		'label'                 => __( 'Servicio', 'text_domain' ),
		'description'           => __( 'Servicios', 'text_domain' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'comments', 'custom-fields', 'page-attributes', 'post-formats' ),
		'taxonomies'            => array( 'category', 'post_tag' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-store',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => false,
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'query_var'             => 'servicio',
		'rewrite'               => $rewrite,
		'capability_type'       => 'page',
		'show_in_rest'          => true,
	);
	register_post_type( 'servicio', $args );

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