Home › Forums › General Issues › Can I exclude only one field for a specific template? › Reply To: Can I exclude only one field for a specific template?
in ACF you can only choose the location of an entire field group, not individual fields.
If you want to do this ACF supplies a filter https://www.advancedcustomfields.com/resources/acf-prepare_field/. Using this filter you could check for the template type of the post and return
false for the template where you don’t want it to show.
However, I don’t know if this will work when switching templates. The post may need to be saved for the change to take effect.
I would probably create different field groups for the different templates. With ACF 5 you could use the Clone Field to clone all the common fields into both of these field groups.
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!
© 2022 Advanced Custom Fields.