• Please help…I have upgraded to the latest version of wordpress and have noticed a bug in the layout…The right sidebar appears below the content section if and only if comments are disabled.

    here is an example of what I’m working with.
    https://scsvinylworks.com/wordpress/2008/09/red-bull-cat-tracks/

    This error happens on all themes with a Right sidebar but only when comments are disabled. I’m not sure if this is something I messed up in the application files but I don’t know where to even look.

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter rstar

    (@rstar)

    here is a fresh install with the theme copied over…same problem

    https://scsvinylworks.com/wordpressWorking/?p=3

    I didn’t disable comments, just changed the words between the <p> </p>
    from “Kick things off” to something like “Leave your two cents.”

    I saw no problem at the time, but now my blog is a mess. The sidebars have switched – iyiyi.

    Anyone else having layout problems – and fonts bigger – for no apparent reason?

    rstar, you need to open comments.php in your themes template and search for:
    <!– If comments are closed. –>

    Then check what’s underneath there, as a guess I think one DIV to many is being closed, hence the sidebar being pushed out of a possible Wrapper DIV, so try getting rid of one.

    You don’t get layout problems, fonts bigger clyob for no apparent reason, it’s something you have done and likley to be CSS related, it’s very unlikley that anything else has caused the problem.

    Thread Starter rstar

    (@rstar)

    Thank you very much for the response…and that does seem like it should make sense. I looked over the code and I don’t see anything missing. This theme was provided by skin press and when I install other themes from them I keep getting the same problem. Here is the code in comments.php from my first post example.

    <?php // Do not delete these lines
    	if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    		die ('Please do not load this page directly. Thanks!');
    
    	if (!empty($post->post_password)) { // if there's a password
    		if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
    			?>
    
    			<p class="nocomments">This post is password protected. Enter the password to view comments.
    
    			<?php
    			return;
    		}
    	}
    
    	/* This variable is for alternating comment background */
    	$oddcomment = 'class="alt comm_items" ';
    ?>
    
    <!-- You can start editing here. -->
    
    <?php if ($comments) : ?>
    	<h2 id="comment_title">Comments:</h2>
    
    	<div class="commentlist">
    
    	<?php foreach ($comments as $comment) : ?>
    
    		<div <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">
            	<div class="commentmetadata"><?php comment_author_link() ?> <span>says...</span></div>
    			<?php if ($comment->comment_approved == '0') : ?>
    			<em>Your comment is awaiting moderation.</em>
    			<?php endif; ?>
    
    			<div class="commentmetadata_text"><?php comment_text() ?></div>
            	<div class="commentmetadata_end">Posted on: <span><?php comment_date('j/M/Y') ?>@<?php comment_time() ?></span></div>
    
    		</div>
    		<div class="clear"></div>
    	<?php
    		/* Changes every other comment to a different class */
    		$oddcomment = ( empty( $oddcomment ) ) ? 'class="comm_items alt" ' : 'class="comm_items"';
    	?>
    
    	<?php endforeach; /* end for each comment */ ?>
    
    	</div>
    
     <?php else : // this is displayed if there are no comments so far ?>
    
    	<?php if ('open' == $post->comment_status) : ?>
    		<!-- If comments are open, but there are no comments. -->
    
    	 <?php else : // comments are closed ?>
    		<!-- If comments are closed. -->
    		<p class="nocomments">Comments are closed.
    
    	<?php endif; ?>
    <?php endif; ?>
    
    <?php if ('open' == $post->comment_status) : ?>
    
    <div id="respond_box">
    <h3 id="respond">Post a comment</h3>
    
    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.
    
    <?php else : ?>
    
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    
    <?php if ( $user_ID ) : ?>
    
    Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout &raquo;</a>
    
    <?php else : ?>
    
    <input type="text" name="author" class="comm_input_text" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
    <label for="author">Name <?php if ($req) echo "(required)"; ?></label>
    
    <input type="text" name="email" class="comm_input_text" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
    <label for="email">Mail (will not be published) <?php if ($req) echo "(required)"; ?></label>
    
    <input type="text" name="url" class="comm_input_text" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
    <label for="url">Website</label>
    
    <?php endif; ?>
    
    <!--<strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small>
    -->
    
    <textarea name="comment" class="comm_textarea_text" id="comment" cols="40" rows="6" tabindex="4"></textarea>
    
    <input name="submit" type="image" src="<?=bloginfo('template_url')?>/images/comm_sub.gif" id="submit" tabindex="5" value="Submit Comment" />
    <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
    
    <?php do_action('comment_form', $post->ID); ?>
    
    </form>
    
    <?php endif; // If registration required and not logged in ?>
    
    <?php endif; // if you delete this the sky will fall on your head ?>
    </div>

    Try removing the </div> at the very end of your comments.php file, re-upload and ensure you do a full refresh of the page.

    Thread Starter rstar

    (@rstar)

    Heck yeaH!!!!you rock xdesi!!!!

    That worked.

    Thank you very much for the help…

    Thread Starter rstar

    (@rstar)

    Well now it happens when comments are enabled…I guess I need to find exactly what div tag is missing!

    Thanks

    Nice one, no problem ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Sidebar jumps when comments are disabled’ is closed to new replies.