Home › Forums › General Issues › Same Relationship field for multiple Post Options sub-pages? › Reply To: Same Relationship field for multiple Post Options sub-pages?
As @hube2 points out in the other linked thread, the method to use is…
acf_add_options_sub_page declaration, add
'post_id' => 'article' as a parameter.
This is how the field data, as entered on the Options page corresponding to my post type, will be saved.
On the display end, display using
$featured_posts = get_field('featured_posts', 'article');
‘article’ and ‘report’ are both used.
In my case, at the display end, I use
$queried_object->name to dynamically infer either ‘article’ or ‘report’ post types.
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!