Custom User Role: Can Edit Own Page, Cannot Create New
I’m not sure you are using the most correct way to restrict so maybe someone else can chime in but this if statement is grabbing the first role in the array which may be dealer or maybe another role if ( ‘dealer’ === $role_name ) { Try instead if ($current_user->has_cap (‘dealer’)) { the has_cap function … Read more