Hi,
I created two CPT's in MetaBox. One is doctor and the other is room. The idea is to choose the doctor that works in a specific room as the rooms are not used by one doctor only.
I also had created custom user roles and one such role is called Assistant.
Up until couple days ago I think, for more than a year, this setup worked perfectly. But today the users told me that they cannot select the doctors when editing a room.
I tried it with my admin user, no problems. But when I logged in with a test user (assistant role), I see that they the list shows no doctors at all.
There's been no changes in the site, settings, etc. All of a sudden, the relationship field to choose the doctor within the Room CPT doesn't show any doctors for the user roles.
Capability type for both CPTs is post
Here's a screenshot of the CPT settings:
Here's a screenshot of the Relationship settings:
Here's the code snippet example I used to add the user role assistant.
add_role('assistant', __(
'Assistant'),
array(
'read' => true, // Allows a user to read
'create_posts' => false, // Allows user to create new posts
'edit_posts' => false, // Allows user to edit their own posts
'edit_others_posts' => false, // Allows user to edit others posts too
'publish_posts' => false, // Allows the user to publish posts
'manage_categories' => false, // Allows user to manage post categories
)
);
Kindly asking for ideas. Thank you all and the team.