function ac_photo_gallery($atts, $content = null)
 {
     extract(shortcode_atts(array('gallery_id' => ''), $atts));
     // If we have a gallery ID return the gallery slideshow
     if ($gallery_id) {
         ob_start();
         ac_gallery_render_bg_gallery($gallery_id);
         $output = ob_get_contents();
         ob_end_clean();
         return $output;
     } else {
         // Return the gallery portfolio
         ob_start();
         ac_gallery_render_galleries();
         $output = ob_get_contents();
         ob_end_clean();
         return $output;
     }
 }
<?php

/*******************************/
/**** Single Post Template  ****/
/*******************************/
// This is also used for any post type that doesn't have it's own template
ac_gallery_render_bg_gallery(get_the_ID());