• Resolved mikemayer66

    (@mikemayer66)


    My sidebar moves to underneath my posts (container) when you click on the “comments/no comments” link. I just noticed it doing for the first time, however I haven’t really tried to post many comments in the past…

    Here is my site, if you click on “no comments” you should see the issue.

    Thanks in advance for any help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Looks like you’re missing a closing </div> in your single.php template.

    mikemayer66,

    It appears that you are actually missing closing div tags on both <div class=”post” id=”post-22″> and <div id=”container”>. I also noticed an unclosed <div class=”clear”> just above <div class=”entry”>.

    https://www.doc4design.com

    Thread Starter mikemayer66

    (@mikemayer66)

    Thanks for getting back to me, I am still pretty new with this stuff, here is my code, I’m afraid I don’t know exactly where those tags need to be, any assistance would be awesome!

    <?php get_header();?>
    <div id="content">
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    
    	<div class="date">
        <?php the_time('d', '', ''); ?>
        <div>
        <?php the_time('M', '', ''); ?>
        </div>
        </div>
        <div class="title">
        <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
            by <?php the_author() ?>
        </div>
    <div class="clear"></div>
    <div class="entry">
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    <div class="postmetadata">
    				<?php the_tags('Tags: ', ', ', '<br />'); ?> <?php the_category(', ') ?>
                    <?php edit_post_link(' | ', '', 'Edit'); ?>
                    </div>
    
    				</div>
                    <?php comments_template(); // Get wp-comments.php template ?>
    
    			</div>
    
    		<?php endwhile; ?>
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Previous') ?></div>
    			<div class="alignright"><?php previous_posts_link('Next &raquo;') ?></div>
    		</div>
    
    	    <?php else : ?>
    	    <h1 class="center">Not Found</h1>
    		<p class="center">Sorry, but you are looking for something that isn't here.</p>
    		<?php include (TEMPLATEPATH . "/searchform.php"); ?>
    
    	<?php endif; ?>
    </div>
    <?php get_sidebar();?>
    <?php get_footer ();?>

    mikemayer66,

    This should work, add an extra closing div tag </div> here:

    </div>
    </div>
    <?php get_sidebar();?>

    Just before the sidebar, this should close off the class=”content” bringing the sidebar back into position. I was looking at the code in Firebug which wasn’t closing off a few other tags throwing me off.

    https://www.doc4design.com

    Thread Starter mikemayer66

    (@mikemayer66)

    Thanks doc4, it worked! I wish I would’ve realized that’s all it was. I appreciated it, thanks!

    Thread Starter mikemayer66

    (@mikemayer66)

    Thanks to esmi also, you caught it right away!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Unintentional rearrangement of layout when trying to post a comment’ is closed to new replies.