<?php if (have_posts()) { while (have_posts()) { the_post(); $format = get_post_format(get_the_id()); $content_classname = is_active_sidebar('main-sidebar') ? 'col-sm-8' : 'col-xs-12'; ?> <article <?php post_class($content_classname); ?> > <?php if (in_array($format, array('gallery', 'quote'))) { get_template_part('format', $format); } else { onepixel_post_thumbnail('large'); $dateTime = new DateTime(); $dateTime->setTimestamp(get_the_time('U')); ?> <div class="entry-heading"> <div class="entry-comments"><a href="#comment-list" title="comment list"><span><?php echo get_comments_number(); ?> </span> <?php _e('Comments', 'onepixel'); ?> </a></div> <h1 class="entry-title"><?php the_title(); ?> </h1>
<?php get_header(); ?> <div class="container"> <div class="row"> <div class="col-sm-8"> <?php onepixel_post_thumbnail(); ?> <?php if (have_posts()) { while (have_posts()) { the_post(); ?> <div <?php post_class($content_classname); ?> > <h1><?php the_title(); ?> </h1> <?php the_content(); ?> </div> <?php } }