Support

Account

Home Forums Front-end Issues advanced custom fields checkbox and gallery Reply To: advanced custom fields checkbox and gallery

  • I’m assuming from your question that the “gallery” is not created on the page in question and is created somewhere else since checking the field will let you add it to any page. If this is the case then you need to supply ACF with the post ID of where the gallery is stored, whether that be another post or on an options page.

    
    $images = get_field('gallery', $post_id);
    

    For more information see the documentation for get field https://www.advancedcustomfields.com/resources/get_field/, especially the part about getting a value from different places.