Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

CPT – Team Members

if ( ! function_exists('team_members_post_type_func') ) {

// Register Custom Post Type
function team_members_post_type_func() {

	$labels = array(
		'name'                  => _x( 'Miembros equipo', 'Post Type General Name', 'master-template-woo' ),
		'singular_name'         => _x( 'Miembro equipo', 'Post Type Singular Name', 'master-template-woo' ),
		'menu_name'             => __( 'Miembros Equipo', 'master-template-woo' ),
		'name_admin_bar'        => __( 'Miembros Equipo', 'master-template-woo' ),
		'archives'              => __( 'Miembros Equipo Archivos', 'master-template-woo' ),
		'attributes'            => __( 'Miembros Equipo Atributos', 'master-template-woo' ),
		'parent_item_colon'     => __( 'Parent Miembros Equipo:', 'master-template-woo' ),
		'all_items'             => __( 'Todos los miembros de equipo', 'master-template-woo' ),
		'add_new_item'          => __( 'Agregar Nuevo Miembro', 'master-template-woo' ),
		'add_new'               => __( 'Agregar Nuevo', 'master-template-woo' ),
		'new_item'              => __( 'Nuevo miembro', 'master-template-woo' ),
		'edit_item'             => __( 'Editar miembro', 'master-template-woo' ),
		'update_item'           => __( 'Actualizar miembro', 'master-template-woo' ),
		'view_item'             => __( 'Ver miembro', 'master-template-woo' ),
		'view_items'            => __( 'Ver miembros', 'master-template-woo' ),
		'search_items'          => __( 'Buscar miembro', 'master-template-woo' ),
		'not_found'             => __( 'Not found', 'master-template-woo' ),
		'not_found_in_trash'    => __( 'Not found in Trash', 'master-template-woo' ),
		'featured_image'        => __( 'Featured Image', 'master-template-woo' ),
		'set_featured_image'    => __( 'Set featured image', 'master-template-woo' ),
		'remove_featured_image' => __( 'Remove featured image', 'master-template-woo' ),
		'use_featured_image'    => __( 'Use as featured image', 'master-template-woo' ),
		'insert_into_item'      => __( 'Insert into item', 'master-template-woo' ),
		'uploaded_to_this_item' => __( 'Uploaded to this item', 'master-template-woo' ),
		'items_list'            => __( 'Items list', 'master-template-woo' ),
		'items_list_navigation' => __( 'Items list navigation', 'master-template-woo' ),
		'filter_items_list'     => __( 'Filter items list', 'master-template-woo' ),
	);
	$rewrite = array(
		'slug'                  => 'miembros-equipo',
		'with_front'            => true,
		'pages'                 => true,
		'feeds'                 => true,
	);
	$args = array(
		'label'                 => __( 'Miembro equipo', 'master-template-woo' ),
		'description'           => __( 'Post Type Description', 'master-template-woo' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'custom-fields' ),
		'taxonomies'            => array( 'category', 'post_tag' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'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'       => 'page',
	);
	register_post_type( 'team_members', $args );

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

}