function widget($args, $instance)
 {
     extract($args);
     /* Our variables from the widget settings. */
     $title = apply_filters('widget_title', $instance['title']);
     $album = $instance['album'];
     $photo_num = $instance['photo_num'];
     /* Before widget (defined by themes). */
     $out = $before_widget;
     /* Title of widget (before and after define by theme). */
     if ($title) {
         $out .= $before_title . $title . $after_title;
     }
     $out .= sp_get_album_gallery($album, $photo_num);
     /* After widget (defined by themes). */
     $out .= $after_widget;
     echo $out;
 }
function sp_gallery_sc($atts, $content = null)
{
    global $post;
    extract(shortcode_atts(array('gallery_id' => null, 'gallery_num' => null), $atts));
    $out = '';
    if ($gallery_id == '-1') {
        // Show each cover album
        $out .= sp_get_cover_album($gallery_num, 'post-slider');
    } else {
        // show individual album
        $out .= sp_get_album_gallery($gallery_id, $gallery_num, 'thumb-medium');
    }
    return $out;
}
			
					<header class="entry-header">
						<h1 class="entry-title">
							<?php 
    the_title();
    ?>
						</h1>
						<div class="entry-meta"><?php 
    the_time('j M, Y');
    ?>
</div>
					</header>

					<div class="entry-content">
						<?php 
    echo sp_get_album_gallery($post->ID, '', 'post-slider');
    ?>
					</div><!-- .entry-content -->
					<?php 
    if (ot_get_option('social_share') != 'off') {
        get_template_part('library/contents/social-share');
    }
    ?>

				</article><!-- #post -->

		<?php 
    // If comments are open or we have at least one comment, load up the comment template.
    if (comments_open() || get_comments_number()) {
        comments_template();
    }