Home › Forums › ACF PRO › hide fields from non-admin users › Reply To: hide fields from non-admin users
There isn’t any way to hide a tab and all of it’s sub fields based on the user role, removing the tab field would simply put the fields into the previous tab.
This would need to be done on the tab field and all of the fields in that tab.
You would need to create an acf/prepare_field filter https://www.advancedcustomfields.com/resources/acfprepare_field/ and attach it to every field you want to remove. In you filter you would check the current user’s role. If the user is not supposed to see this field the you return false
from your filter and this will remove the field from field group for that user.
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.