Home Forums ACF PRO Get gallery from post object Reply To: Get gallery from post object

  • Hi @redsun

    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 $post_objects variable.

    If you still can’t solve the issue, could you please share the JSON or XML export file of your field group?