Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

mlcx

if ( ! function_exists('mlcx_cpt') ) {

// Register Custom Post Type
function mlcx_cpt() {

	$labels = array(
		'name'                  => _x( 'Mujeres Lideres CX', 'Post Type General Name', 'mlcx_cpt' ),
		'singular_name'         => _x( 'Mujer Lider CX', 'Post Type Singular Name', 'mlcx_cpt' ),
		'menu_name'             => __( 'Mujeres Lideres CX', 'mlcx_cpt' ),
		'name_admin_bar'        => __( 'Mujeres Lideres CX', 'mlcx_cpt' ),
		'archives'              => __( 'Archivo de Mujeres Lideres CX', 'mlcx_cpt' ),
		'attributes'            => __( 'Atributos de Mujer Lider', 'mlcx_cpt' ),
		'parent_item_colon'     => __( 'Mujer Lider Parent Item', 'mlcx_cpt' ),
		'all_items'             => __( 'Todas las Mujeres Lideres', 'mlcx_cpt' ),
		'add_new_item'          => __( 'Añadir Nueva Mujer Lider', 'mlcx_cpt' ),
		'add_new'               => __( 'Añadir Nueva', 'mlcx_cpt' ),
		'new_item'              => __( 'Nueva Mujer Lider', 'mlcx_cpt' ),
		'edit_item'             => __( 'Editar Mujer Lider', 'mlcx_cpt' ),
		'update_item'           => __( 'Actualizar Mujer Lider', 'mlcx_cpt' ),
		'view_item'             => __( 'Ver Mujer Lider', 'mlcx_cpt' ),
		'view_items'            => __( 'Ver Mujeres Lideres', 'mlcx_cpt' ),
		'search_items'          => __( 'Buscar Mujer Lider', 'mlcx_cpt' ),
		'not_found'             => __( 'No encontrada', 'mlcx_cpt' ),
		'not_found_in_trash'    => __( 'No encontrada en Trash', 'mlcx_cpt' ),
		'featured_image'        => __( 'Imagen Destacada', 'mlcx_cpt' ),
		'set_featured_image'    => __( 'Añadir como Imagen Destacada', 'mlcx_cpt' ),
		'remove_featured_image' => __( 'Quitar Imagen Destacada', 'mlcx_cpt' ),
		'use_featured_image'    => __( 'Usar como Imagen Destacada', 'mlcx_cpt' ),
		'insert_into_item'      => __( 'Insertar', 'mlcx_cpt' ),
		'uploaded_to_this_item' => __( 'Actualizar', 'mlcx_cpt' ),
		'items_list'            => __( 'Lista', 'mlcx_cpt' ),
		'items_list_navigation' => __( 'Items list navigation', 'mlcx_cpt' ),
		'filter_items_list'     => __( 'Filter items list', 'mlcx_cpt' ),
	);
	$rewrite = array(
		'slug'                  => 'mujeres-lideres-cx',
		'with_front'            => true,
		'pages'                 => true,
		'feeds'                 => true,
	);
	$args = array(
		'label'                 => __( 'Mujer Lider CX', 'mlcx_cpt' ),
		'description'           => __( 'CPT para Mujeres Lideres CX', 'mlcx_cpt' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'custom-fields' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'http://imt.com.mx/wp-content/uploads/2018/11/hairstyle.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'       => 'page',
		'show_in_rest'          => true,
	);
	register_post_type( 'mlcx_cpt', $args );

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

}