AH User Profiles
if ( ! function_exists('user_profile') ) {
// Register Custom Post Type
function user_profile() {
$labels = array(
'name' => _x( 'User Profiles', 'Post Type General Name', 'ah' ),
'singular_name' => _x( 'User Profile', 'Post Type Singular Name', 'ah' ),
'menu_name' => __( 'User Profiles', 'ah' ),
'name_admin_bar' => __( 'User Profiles', 'ah' ),
'archives' => __( 'User Profile Archives', 'ah' ),
'attributes' => __( 'User Profile Attributes', 'ah' ),
'parent_item_colon' => __( 'Parent User Profile:', 'ah' ),
'all_items' => __( 'All User Profiles', 'ah' ),
'add_new_item' => __( 'Add New User Profile', 'ah' ),
'add_new' => __( 'Add New User Profile', 'ah' ),
'new_item' => __( 'New User Profile', 'ah' ),
'edit_item' => __( 'Edit User Profile', 'ah' ),
'update_item' => __( 'Update User Profile', 'ah' ),
'view_item' => __( 'View User Profile', 'ah' ),
'view_items' => __( 'View User Profiles', 'ah' ),
'search_items' => __( 'Search User Profile', 'ah' ),
'not_found' => __( 'Not found', 'ah' ),
'not_found_in_trash' => __( 'Not found in Trash', 'ah' ),
'featured_image' => __( 'Featured Image', 'ah' ),
'set_featured_image' => __( 'Set featured image', 'ah' ),
'remove_featured_image' => __( 'Remove featured image', 'ah' ),
'use_featured_image' => __( 'Use as featured image', 'ah' ),
'insert_into_item' => __( 'Insert into User Profile', 'ah' ),
'uploaded_to_this_item' => __( 'Uploaded to this User Profile', 'ah' ),
'items_list' => __( 'User Profiles list', 'ah' ),
'items_list_navigation' => __( 'User Profiles list navigation', 'ah' ),
'filter_items_list' => __( 'Filter User Profiles list', 'ah' ),
);
$args = array(
'label' => __( 'User Profile', 'ah' ),
'description' => __( 'User profiles for both agents and buyers', 'ah' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'revisions' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-groups',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => true,
'publicly_queryable' => true,
'capability_type' => 'page',
'show_in_rest' => false,
);
register_post_type( 'user_profile', $args );
}
add_action( 'init', 'user_profile', 0 );
}