widgets move below main text when comments turned off
-
I’ve got a weird problem that I can’t seem to figure out.
When I have comments turned on, the widgets appear on the right of the main text, just as they are supposed to do.
However, if I turn off comemnts on a post, the widget moves below the maintext.
This will show you what I mean:
On
http://moonworks.co/uncategorized/comments-turned-onOff
http://moonworks.co/uncategorized/comments-turned-offI’ve found that if I add an extra
</div>to the single.php page it will solve the problem when comments are turned off, but it totally messes up the page when they are turned on. I add the div here (the final div is extra):<?php comments_template(); ?> <div style="clear: both;"></div> </div></div>This is the code I have in the single.php file:
<?php get_header(); ?> <div id="wrapper"> <div id="column-setup"> <div class="postsmain"> <h1><?php the_title(); ?></h1><p> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="content-styles"><?php the_content(__('Keep Reading'));?></div> <?php endwhile; else: ?> <?php endif; ?> <?php comments_template(); ?> <div style="clear: both;"></div> </div> <div class="postswidget"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Pages') ) : ?> <?php endif; ?> </div> </div> </div> <?php get_footer(); ?>
The topic ‘widgets move below main text when comments turned off’ is closed to new replies.