Page.php vs Single.php

Edit

Based on this comment:

commenting out comments_template works.

The problem lies in the template markup in comments.php. The likely reason that you see it in some output and not others is likely because you’ve got comments enabled in one context, and not in the other. Try comparing single posts with comments enabled vs disabled, and you’ll likely see the same thing happen.

Original

You’ve closed your loop in the wrong place. Your <?php endwhile; ?> is in the middle of your post-container markup. Also, you don’t ever close your if clause.

I would modify your markup to be a bit more intuitive, and also close the loop properly:

<div class="container span12" id='single-post'>

    <div class="span8 alignleft">

        <?php 
           if ( have_posts() ) while ( have_posts() ) : the_post(); 
           $post_id = $post->ID;
        ?>

        <div class="post single">

            <h2 class="entry-title"><?php the_title(); ?></h2>

            <?php the_content(); ?>

            <?php comments_template( '', true ); ?>

        </div><!-- .post single -->

        <?php endwhile; endif; ?>

    </div><!-- .span8 alignleft -->

    <div class="span4 alignright">
      <div id='sidebar'>
        <?php get_sidebar(); ?>
      </div>
    </div>

</div><!--end container-->

That should resolve any <div> nesting problems related to the Loop. If not, you’ll need to provide a live link to the rendered output, so we can see what’s happening.

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş