Hey guys,
We’re using ACF Pro for one of our customers.
Along with it we’re using the flexible-content feature, so users can pick different layouts.
We have two roles in WordPress: Admin and Editor.
Is there any way I can restrict flexible-content layouts for the Editor role? So Admin can choose layout A, B and C but Editor only can choose B and C for example. I couldn’t find any filter or action for this purpose.
Thanks in advance and best regards
Nick
There isn’t a filter to directly effect layouts.
I think you can use acf/prepare_field on the flex field. In the filter you should be able to loop over the layouts ($field[‘layouts’]) and remove layouts. See this https://support.advancedcustomfields.com/forums/topic/disable-layout-from-showing-in-template/#post-53129