Home › Forums › ACF PRO › Different values for same field groups on different options pages? › Reply To: Different values for same field groups on different options pages?
Ok, I think I came up with a working solution. Here’s the code:
https://gist.github.com/solepixel/e8f09b9ba781502f893274ff8bf6dcf1
Basically, each settings page needs a menu_slug and that menu_slug should have somewhat of a consistent naming convention to identify settings pages with common field groups.
Then, the settings page also needs a way of identifying the unique values, in my case they’re associated with Post Type Archives, so I’m using the Post Type.
I make sure the screen matches one of the desired settings pages, then I prefix the field with the Post Type, so I can grab the specific field setting in my theme. Hope that helps someone.
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.