WordPress custom field images not getting inserted into array

You can use this code with native WordPress Uploader. If you assing your images to custom field you must use get_post_meta like functions. The basic way, Upload your images from Add Media area to your post and use this code in your single.php or which theme file you use.

if ($migallery = get_children(
    array(
            'post_parent' => get_the_ID(),
            'post_type' => 'attachment',
            'numberposts' => -1,
            'post_mime_type' => 'image', 
            'exclude' => get_post_thumbnail_id()
        )
    )
)
{
            $aa_string .= "<div>"; //Before gallery div
            foreach ($migallery as $galerir)
            {
                $aath            = wp_get_attachment_image_src($galerir->ID, 'thumbnail');
                $aabg            = wp_get_attachment_image_src($galerir->ID, 'full');
                $aa_string      .= "<a href="https://wordpress.stackexchange.com/questions/165330/$aabg[0]">";
                $aa_string      .= "<img src="$aath[0]"/>";
                $aa_string      .= "</a>";
            }
            $aa_string .= "</div>"; //div ends
}
            $aa_string .= "<div style="clear:both;"></div>";
            return aa_string;

You can change code (esp. foreach area)for Bootstrap gallery.