<?php
/**
   * The template for Single page.
   *
   *
   * @package   ospersonality WordPress Theme
   * @copyright Copyright (C) 2016, OrdaSoft
   * @license    http://www.gnu.org/licenses/gpl-2.0.html  GNU General Public License v2 or later
   * @author      AUTHOR <www.ordasoft.com>
   * ospersonality is distributed under the terms of the GNU GPL
*/
  $sidebar_left = false;
if (is_active_sidebar( 'sidebar_left' ) ) {
    $sidebar_left = true;
}

ospersonality_header_home()
?>
<div id="single" class="single-main">
    <div class="single-content container-fluid">

        <div class="row">
            <?php if (is_active_sidebar( 'sidebar_left' ) ) : ?>
            <div class="widgets col-lg-3 col-md-3 col-sm-3 col-xs-12">
                <article id="sidebar-left" class="sidebar">
                    <?php  dynamic_sidebar('sidebar_left'); ?>
                </article>
            </div>
            <?php endif; ?>

            <div class="<?php if($sidebar_left) :
                echo ('col-lg-9 col-md-9 col-sm-9 col-xs-12');?>">
               <?php echo ('<div class="single-content">');
                else :
                echo('col-lg-12 col-md-12 col-sm-12 col-xs-12'); ?>">
                <?php echo ('<div class="single-content container">');
                endif; ?>
                    <?php if ( have_posts() ) : ?>
                    <?php while ( have_posts() ) : the_post();  ?>
                        <?php   get_template_part( 'template-parts/content', get_post_format() );

                        endwhile; ?>
                    <?php if ( comments_open() || get_comments_number() ) {
                        comments_template();
                            } ?>
                    <?php ospersonality_post_nav();

                     else :

                        get_template_part( 'template-parts/content', 'none' );

                     endif; ?>
            </div>

        </div>
        </div>

    </div>
</div><!-- #main -->
<?php get_footer(); ?>