Now that the clone field is available, one potential solution could be to use ‘Prefix Field Names’ to easily differentiate between multiple options pages with the same options.
The need for backwards compatibility is certainly vital.
An alternative could be making the value become an object or array, with the options page identifier as the key, allowing you to retrieve the values for specific options pages, even without using ACF. This would get around the 64 character limit of option names and allow for unique values to be stored per options page.
Would that be any better in terms of backwards compatibility, Hube2?
Agreed, Michelle.
To get around the 64 character limit, perhaps a sort of hashing could be done to give unique option slugs that meet that limit and ensure that option values can be unique to option pages?
For others having this issue: I was able to remove my duplicate fields by removing the duplicate json file from the /acf-json/ folder.
Hm. That’s unfortunate. Where are they stored under the wp_options table? I don’t see the one I’ve currently entered. Never mind, I was looking in the wrong database.
Like I said in the original post, I’d expect to be able to access the option by using the_field('field_name','option_page_slug');
. For storing under the WP_Options table, it could be prefixed with that slug to keep options unique to specific pages.
Sorry to reply to an old topic, but didn’t want to start a new thread since I was thinking the same thing after I switched to ACF5 Pro.
City, State/Locality, Zip and Country would be extremely valuable to pull from these fields. Is there a reason that extra data isn’t stored with the address, lat & lng? That data should be coming in from Google Maps when the request is made.
I tried digging through the ACF code myself to see, but can’t make much sense of it.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.