Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

cpt_entrepreneurs

if ( ! function_exists('ctp_entrepreneurs') ) {

// Register Custom Post Type
function ctp_entrepreneurs() {

	$labels = array(
		'name'                  => _x( 'Emprendedores', 'Post Type General Name', 'text_domain' ),
		'singular_name'         => _x( 'Emprendedor', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'             => __( 'Emprendedores', 'text_domain' ),
		'name_admin_bar'        => __( 'Emprendedor', 'text_domain' ),
		'archives'              => __( 'Archivo de emprendedores', 'text_domain' ),
		'attributes'            => __( 'Item Attributes', 'text_domain' ),
		'parent_item_colon'     => __( 'Parent Item:', 'text_domain' ),
		'all_items'             => __( 'Todos los emprendedores', 'text_domain' ),
		'add_new_item'          => __( 'Añadir nuevo emprendedor', 'text_domain' ),
		'add_new'               => __( 'Añadir nuevo', 'text_domain' ),
		'new_item'              => __( 'Nuevo emprendedor', 'text_domain' ),
		'edit_item'             => __( 'Editar emprendedor', 'text_domain' ),
		'update_item'           => __( 'Actualizar emprendedor', 'text_domain' ),
		'view_item'             => __( 'Ver emprendedor', 'text_domain' ),
		'view_items'            => __( 'Ver emprendedores', 'text_domain' ),
		'search_items'          => __( 'Buscar emprendedores', 'text_domain' ),
		'not_found'             => __( 'No se han encontrado emprendedores', 'text_domain' ),
		'not_found_in_trash'    => __( 'No se han encontrado emprendedores en la papelera.', 'text_domain' ),
		'featured_image'        => __( 'Imagen destacada', 'text_domain' ),
		'set_featured_image'    => __( 'Establecer la imagen destacada', 'text_domain' ),
		'remove_featured_image' => __( 'Eliminar la imagen destacada', 'text_domain' ),
		'use_featured_image'    => __( 'Usar como imagen destacada', 'text_domain' ),
		'insert_into_item'      => __( 'Insert into item', 'text_domain' ),
		'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),
		'items_list'            => __( 'Items list', 'text_domain' ),
		'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),
		'filter_items_list'     => __( 'Filter items list', 'text_domain' ),
	);
	$rewrite = array(
		'slug'                  => 'emprendedores',
		'with_front'            => true,
		'pages'                 => true,
		'feeds'                 => true,
	);
	$args = array(
		'label'                 => __( 'Emprendedor', 'text_domain' ),
		'description'           => __( 'Datos de emprendedores peruanos', 'text_domain' ),
		'labels'                => $labels,
		'supports'              => array( 'thumbnail' ),
		'taxonomies'            => array( 'post_tag' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-id',
		'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( 'entrepreneurs', $args );

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

}