Forums

[resolved] Unintentional rearrangement of layout when trying to post a comment (7 posts)

  1. mikemayer66
    Member
    Posted 2 years ago #

    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!

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Looks like you're missing a closing </div> in your single.php template.

  3. doc4
    Member
    Posted 2 years ago #

    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">.

    http://www.doc4design.com

  4. mikemayer66
    Member
    Posted 2 years ago #

    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 ();?>
  5. doc4
    Member
    Posted 2 years ago #

    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.

    http://www.doc4design.com

  6. mikemayer66
    Member
    Posted 2 years ago #

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

  7. mikemayer66
    Member
    Posted 2 years ago #

    Thanks to esmi also, you caught it right away!

Topic Closed

This topic has been closed to new replies.

About this Topic