I have created 5 different field groups. Each contains data for different content types:
Homepage
Floor Plans
Neighborhood Map
Interiors
Gallery
Now I want to make a select menu (accessed from side of any new page) with following values and tie it in location rules. The idea is when you select a value it changes the field group which is loaded on that page… kind of the same way it works with page templates (i’m just using 1 template so cannot do it with templates).
My select is called “template”:
floorplan : Floor Plans
map : Neighborhood Map
interiors : Interiors
gallery : Gallery
content : Editorial Content
Anyone know if this is even possible or how to go about it?
You can’t set location rules base on a select field in another field group.
but you can use a custom taxonomy, you could call it “Page Type”. This would work just like a “Category” for Posts and you can have the field groups locations set based on the taxonomy terms.
Thanks John.
I found 2 things in my search just now:
1. ACF 4 – Meta rule plugin works well https://wordpress.org/plugins/advanced-custom-fields-meta-location-rule/
2. ACF 5 – Like John said:
– I made a taxonomy called “template”
– and taxonomy field that updates the post terms on each page
– then “post taxonomy” is equal to “template type” on template field groups
Works like a charm!
I’ve seen the plugin you mentioned before but since it has not been updated in a while and I’m not too sure if it will work with ACF5, I haven’t tried it. I’ve book marked the plugin because this feature is something that’s been requested a few times and if I have time in the future I may dig through it to see if it’s something that difficult to get done.