• Hello!

    Please have a look at the site: https://www.fan-sites.org/audrey-tautou/?p=45#comments

    This is one of the comment pages of my site – as you can see, the sidebar does not show up correctly. I have no idea what the problem is, so please help me!

    This is the Comments Template, where is the mistake? Did I put the get_sidebar in the wrong place?

    <?php // Do not delete these lines<br />
    if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))<br />
    die ('Please do not load this page directly. Thanks!');

    if (!empty($post->post_password)) { // if there's a password<br />
    if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie<br />
    ?>

    <p class="nocomments"><?php _e("This post is password protected. Enter the password to view comments."); ?>

    <?php<br />
    return;<br />
    }<br />
    }

    /* This variable is for alternating comment background */<br />
    $oddcomment = 'alt';<br />
    ?>

    <!-- You can start editing here. -->

    <?php if ($comments) : ?><br />
    <h2 class="pagetitle"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to “<?php the_title(); ?>”</h2>

    <ol class="commentlist">

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

    <div class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>"><br />
    <?php comment_author_link() ?> says:<br />
    <?php if ($comment->comment_approved == '0') : ?><br />
    <em>Your comment is awaiting moderation.</em><br />
    <?php endif; ?><br />

    <small class="commentmetadata"><a>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php edit_comment_link('','',''); ?></small>

    <?php comment_text() ?>

    </div>

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

    <?php else : // this is displayed if there are no comments so far ?>

    <?php if ('open' == $post-> comment_status) : ?><br />
    <!-- If comments are open, but there are no comments. -->

    <?php else : // comments are closed ?><br />
    <!-- If comments are closed. --><br />
    <p class="nocomments">Comments are closed.

    <?php endif; ?><br />
    <?php endif; ?>

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

    <br>

    <h2 class="pagetitle">Thanks for your feedback!</h2>

    <div class="comments"><?php if ( get_option('comment_registration') &&amp; !$user_ID ) : ?><br />
    You must be <a>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.<br />
    <?php else : ?>

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

    <?php if ( $user_ID ) : ?>

    <?php else : ?>

    <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="25" tabindex="1" /><br />
    <label for="author"><small>Name <?php if ($req) _e('(required)'); ?></small></label>

    <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="25" tabindex="2" /><br />
    <label for="email"><small>Mail (will not be published) <?php if ($req) _e('(required)'); ?></small></label>

    <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="25" tabindex="3" /><br />
    <label for="url"><small>Website</small></label>

    <?php endif; ?>

    <!--<small><strong>XHTML:</strong> You can use these tags: <?php echo allowed_tags(); ?></small>-->

    <textarea name="comment" id="comment" cols="5" rows="6" tabindex="4"></textarea>

    <input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" /><br />
    <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />

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

    </form><br />
    </div>

    <p style="margin-left: 10px"><a href="history.back(-1);">Back</a>

    <br>

    <?php get_sidebar(); ?>

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

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

    Thanks in advance
    ~ Manila

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Sidebar not showing correctly on comment page’ is closed to new replies.