Support » Fixing WordPress » Sidebar Not At The Side

  • Resolved chanel


    When you view my site homepage everything looks fine but when you click on the direct link to the blog post either from the front page or the archives the sidebar loads beneath the blog post and everything looks messed up.

    here’s a link to an example:

Viewing 5 replies - 1 through 5 (of 5 total)
  • Here is Single Post (single.php)

    <?php get_header(); ?>

    <div id=”content”>

    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <img src=”<?php bloginfo(‘template_url’);
    ?>/images/post_title01.png” align=”left” alt=”” /> <font size=”4″ face=”Georgia”>” title=”<?php _e(‘Permanent link to’); ?><?php the_title(); ?>”><?php the_title(); ?></font>
    <font size=”1″ face=”georgia”><?php the_time(‘F jS, Y’) ?> @ <?php the_time() ?></font>
    <div align=”justify”><?php the_content(”); ?></div>
    <?php wp_link_pages(); ?>
    <img src=”<?php bloginfo(‘template_url’); ?>/images/filed_in.png” alt=”” /> <?php the_category(‘ · ‘) ?>

    <?php comments_template(); ?>

    <?php endwhile; else: ?>

    <h2 class=”pagetitle”><?php _e(‘Search Results’); ?></h2>
    <p><?php _e(‘Sorry, but no posts matched your criteria.’); ?></p>
    <?php include (TEMPLATEPATH . ‘/searchform.php’); ?>

    <?php endif; ?>


    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    Here’s the comment.php also. I have a feeling it’s one of these 2 files jacking it all up:

    <?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”>Post Status: LOCKED. Email me for the password.<p>


    <!– You can start editing here. –>

    <div align=”justify”><?php if ($comments) : ?>
    <h3 id=”comments”><?php comments_number(__(‘Comments’), __(‘1 Comment’), __(‘% Comments’));?></h3>

    <ol id=”commentlist”>

    <?php foreach ($comments as $comment) : ?>

    <li id=”comment-<?php comment_ID() ?>”>
    <?php if (function_exists(‘gravatar’)) { ?><img src=”<?php gravatar(“X”, 50, “”); ?>” class=”gravatar” alt=”Gravatar Icon” Align=”right” hspace=”5″and vspace=”5″/><?php } ?> <h4 class=”commentauthor”><?php comment_author_link() ?>
    <?php _e(‘said,’); ?></h4>
    <p class=”commentmeta”><?php comment_date(‘F j, Y’) ?> <?php _e(‘at’); ?> ” title=”<?php _e(‘Permanent link to this comment’); ?>”><?php comment_time() ?> <?php edit_comment_link(__(‘Edit’),’ · ‘,”); ?></p>
    <?php comment_text() ?>

    <?php endforeach; /* end for each comment */ ?>

    <?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. –>

    <?php endif; ?>
    <?php endif; ?>

    <?php if (‘open’ == $post->comment_status) : ?>

    <h3 id=”postcomment”><?php _e(‘Post a Comment’); ?></h3>

    <?php if ( get_option(‘comment_registration’) && !$user_ID ) : ?>
    <p><?php _e(‘You must be’); ?>e /wp-login.php?redirect_to=<?php the_permalink(); ?>”><?php _e(‘logged in’); ?> <?php _e(‘to post a comment.’); ?></p>
    <?php else : ?>

    <form action=”<?php echo get_option(‘siteurl’); ?>/wp-comments-post.php” method=”post” id=”commentform”>

    <?php if ( $user_ID ) : ?>

    <p><?php _e(‘Logged in as’); ?> /wp-admin/profile.php”><?php echo $user_identity; ?>. /wp-login.php?action=logout” title=”<?php _e(‘Log out of this account’); ?>”><?php _e(‘Logout’); ?> »</p>

    <?php else : ?>

    <input type=”text” name=”author” id=”author” value=”<?php echo $comment_author; ?>” size=”28″ tabindex=”1″ />
    <label for=”author”><?php _e(‘Name’); ?> <?php if ($req) _e(‘(required)’); ?></label>

    <input type=”text” name=”email” id=”email” value=”<?php echo $comment_author_email; ?>” size=”28″ tabindex=”2″ />
    <label for=”email”><?php _e(‘E-mail’); ?> <?php if ($req) _e(‘(required)’); ?></label>

    <input type=”text” name=”url” id=”url” value=”<?php echo $comment_author_url; ?>” size=”28″ tabindex=”3″ />
    <label for=”url”><abbr title=”<?php _e(‘Uniform Resource Identifier’); ?>”><?php _e(‘URI’); ?></abbr></label>

    <?php endif; ?>

    <textarea name=”comment” id=”comment” cols=”80″ rows=”10″ tabindex=”4″></textarea>

    <input name=”submit” type=”submit” id=”submit” tabindex=”5″ value=”<?php _e(‘Submit Comment’); ?>” />
    <input type=”hidden” name=”comment_post_ID” value=”<?php echo $id; ?>” />

    <?php do_action(‘comment_form’, $post->ID); ?>

    <?php endif; // If registration required and not logged in ?>

    <?php endif; // if you delete this the sky will fall on your head ?>

    I fixed it. “Thanks for all the help”.

    Was this fixed? I don’t see anything wrong on the link.

    EDIT: Ha. Sorry, just noticed the “Resolved”…

    jcow – the theme I am using was created by someone else who coded it incorrectly. So in Single Post (single.php), there was a missing </div> that needed to be added above <?php get_sidebar(); ?>

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sidebar Not At The Side’ is closed to new replies.