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?
I experimented and think I figured it out…
If I use 'post_id' => 'options2'
in acf_add_options_sub_page
per your suggestion, then where corresponding options2
needs to appear on display is…
$featured_posts = get_field('featured_posts', 'options2');
This suggests I can use…
$featured_posts = get_field('featured_posts', 'article');
$featured_posts = get_field('featured_posts', 'report');
To display through my singular template fragment, showcase.php, I’m going to need to write a little piece to determine whether to call “article” or “report”.
You’re right, this is not at all clear from docs. You should write ACF: The Missing Manual.
BTW, I get a weird white screen when I save these options for the first time.
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.