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?
Fields added via options pages are all saved and loaded in via ‘option’ as opposed to page id. As such, the only way to have two options pages with unique data is to make them each have unique slugs.
Once you’ve changed the slugs for the pages, you won’t be able to see the data any longer – so do keep it open in a tab or just c&p somewhere if it’s important to keep a record of it before changing.
As to referencing this data, outside of having an if statement to check the post type and output the relevant options depending on the outcome, if you put the relevant post type at the beginning / end of the field name, you could reference this using the WordPress get_post_type function.
get_field( get_post_type($post) . '_description', 'options' );
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!
💻 The next ACF Chat Fridays features a live demo of one of our most highly-requested features: registering CPTs and custom taxonomies directly in ACF. Don’t miss it!— Advanced Custom Fields (@wp_acf) February 27, 2023
📆 Friday 3rd March 3pm UTC
👉 Register here - https://t.co/3UtvQbDwNm pic.twitter.com/j4r4ouQtz9
© 2023 Advanced Custom Fields.