Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Collea portal

if ( ! function_exists('portal') ) {

// Register Custom Post Type
function portal() {

	$labels = array(
		'name'                => _x( 'Portal', 'Post Type General Name', 'simpel' ),
		'singular_name'       => _x( 'Portal', 'Post Type Singular Name', 'simpel' ),
		'menu_name'           => __( 'Portal', 'simpel' ),
		'name_admin_bar'      => __( 'Portal', 'simpel' ),
		'parent_item_colon'   => __( 'Parent page:', 'simpel' ),
		'all_items'           => __( 'All pages', 'simpel' ),
		'add_new_item'        => __( 'Add new page', 'simpel' ),
		'add_new'             => __( 'Add new', 'simpel' ),
		'new_item'            => __( 'New page', 'simpel' ),
		'edit_item'           => __( 'Edit page', 'simpel' ),
		'update_item'         => __( 'Update page', 'simpel' ),
		'view_item'           => __( 'View page', 'simpel' ),
		'search_items'        => __( 'Search pages', 'simpel' ),
		'not_found'           => __( 'Not found', 'simpel' ),
		'not_found_in_trash'  => __( 'Not found in Trash', 'simpel' ),
	);
	$rewrite = array(
		'slug'                => 'portal',
		'with_front'          => true,
		'pages'               => true,
		'feeds'               => false,
	);
	$args = array(
		'label'               => __( 'Portal', 'simpel' ),
		'description'         => __( 'Customer portal', 'simpel' ),
		'labels'              => $labels,
		'supports'            => array( 'title', 'editor', 'excerpt', 'thumbnail', 'page-attributes', ),
		'taxonomies'          => array( 'category', 'post_tag' ),
		'hierarchical'        => true,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'menu_position'       => 5,
		'menu_icon'           => 'dashicons-media-text',
		'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( 'portal', $args );

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

}