Support

Account

Home Forums Backend Issues (wp-admin) Custom User Role / Screen Options

Solving

Custom User Role / Screen Options

  • Hi there,

    I have a custom user role defined “External Contributor” which gives a stripped-down view when logging in (i.e. only access to a particular custom post type).

    I’m running into an issue where the custom fields (ACF) that are assigned to this post type are only available to users with admin or editor capabilities.

    I have enabled screen options/ meta for the custom user role and they appear, but the custom field group doesn’t appear as an option within the screen options tab – the group does appear (automatically ticked) for either an editor or admin.

    Hoping this is a simple oversight on my part, but any guidance greatly appreciated!

    Many thanks.

  • There is a filter in ACF that you can use to modify the capability required.

    you can create a function for this filter, get the current screen and see if it’s for your post type and if it is change the capability to match a capability for your custom user role and post type

    
    add_filter('acf/settings/capability', 'my_change_capability');
    function my_change_capability($value) {
      // get the current screen
      // if your CPT change value to your capability
      return $value;
    }
    
Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Custom User Role / Screen Options’ is closed to new replies.