Home › Forums › Feature Requests › Hide Elements for specific user roles › Reply To: Hide Elements for specific user roles
No, that is not possible through settings. You can create a filter, there is an undocumented filter acf/get_field_group
add_filter('acf/field_group', 'my_change_field_group');
function my_change_field_group($group) {
if ($group['key'] = 'group_your-group-key') {
// check current user role
// set $group['hide_on_screen'] with array of things you want to hide
// look at an exported field group for examples of what goes here
}
return $group;
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.