Support

Account

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?

  • Hmm,

    Okay, adding 'post_id' => 'options2_featured_posts' successfully separates things in the backend…

    // Support showcase Features for this post type, via ACF
    
    if( function_exists('acf_add_options_page') ) {
    
    	// add sub page
    	acf_add_options_sub_page(array(
    		'page_title' 	=> 'Articles Features',
    		'menu_title' 	=> 'Articles Features',
        'menu_slug'   => 'articles-features',
        'capability'  => 'edit_posts',
    		'parent_slug' 	=> 'edit.php?post_type=article',
        'position'    => false,
        'icon_url'    => false,
    	'post_id' 		=> 'options2_featured_posts'
    	));
    
    }

    But what does this mean for how I should call/display the resulting data?

    So far, I have used a common template part, “showcase”, to serve up the features in a consistent layout, including…

            // Must get IDs from ACF options page...
            $featured_posts = get_field('featured_posts', 'option');

    … as seen in the docs.

    How should that change to reflect options2_featured_posts?

    Do I perhaps have an issue using an underscore in the original field name?

    Thanks.