Home › Forums › ACF PRO › Get gallery from post object › Reply To: Get gallery from post object
Did you call the post object field outside The Loop? If you did, you need to set the post ID for the second parameter like this:
global $post; $post_objects = get_field('gallery_select', $post->ID);
Also, please make sure that you used a multiple post objects field. If you used a single post object field, you don’t have to loop through the
If you still can’t solve the issue, could you please share the JSON or XML export file of your field group?
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 2023 ACF Annual Survey closes tomorrow! This is your last chance to complete the survey and help guide the evolution of ACF. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 18, 2023
© 2023 Advanced Custom Fields.