Comments not Displaying on Page
-
I just purchased a new theme and the comments aren’t displaying on the page.
https://newsstump.com/2009/03/test-post-2/
As you can see, the number of comments is “3.”, but they are not visible to the reader. Any idea how to tweak the code? here is my existing code…
<?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; } } ?> <div class="box"> <div class="box_title"><h3> <img src="<?php bloginfo('template_url'); ?>/img/comment_icon.gif" alt="comment" /> <?php comments_number('No Comments', 'One Comment', '% Comments' );?><br style="clear:right" /> </h3></div> <div class="box_line"> </div> <div class="box_body"> <?php foreach ($comments as $comment) : ?> <div class="comments"> <ul> <li> <div class="comment_header">Posted by <strong><?php comment_author_link() ?></strong> on <?php comment_date('F jS, Y') ?>, <?php comment_time() ?></div> <div class="comment_body"> <?php if ($comment->comment_approved == '0') : ?> <em>Your comment is awaiting moderation.</em> <?php endif; ?> <?php comment_text() ?> </div> </li> </ul> </div> <?php endforeach; /* end for each comment */ ?> <!-- end article_comment--> <?php if ('open' == $post->comment_status) : ?> <!-- If comments are open, but there are no comments. --> <?php else : // comments are closed ?> <!-- If comments are closed. --> <h4>Comments are closed.</h4> <?php endif; // 1 ?> <?php if ('open' == $post->comment_status) : ?> <div id="comment_form" > <div class="box"> <div class="box_title"><h3>Post your comment <img src="<?php bloginfo('template_url'); ?>/img/comment_icon.gif" alt="comment" /></h3></div> <div class="box_line"> <!-- --> </div> <?php if ( get_option('comment_registration') && !$user_ID ) : ?> <h4>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</h4> <?php else : ?> <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post"> <?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 »</a> <?php else : ?> <div class="box_body"> <div class="form_line"> <label>Your name: <?php if ($req) echo "(required)"; ?></label> <div class="formElement"> <input name="author" type="text" value="<?php echo $comment_author; ?>" class="input_Fields" tabindex="2" / </div> </div> <div class="form_line"> <label>Your e-mail address: <?php if ($req) echo "(required)"; ?></label> <div class="formElement"> <input name="email" type="text" value="<?php echo $comment_author_email; ?>" class="input_Fields" tabindex="3" /> </div> </div> <div class="form_line"> <label>Your website: </label> <div class="formElement"> <input name="url" type="text" value="<?php echo $comment_author_url; ?>" class="input_Fields" tabindex="3" /> </div> </div> <?php endif; ?> <div class="form_line"> <label>Add your comments</label> <div class="formElement"> <textarea name="comment" rows="6" cols="30" tabindex="4"></textarea> </div> </div> <div class="form_line"> <label></label> <div class="formElement"> <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /> <input type="submit" value="Submit" tabindex="6" /> </div> </div> <?php do_action('comment_form', $post->ID); ?> </div> </div> </form> <?php endif; ?> <?php endif; ?> </div> </div> </div>
- The topic ‘Comments not Displaying on Page’ is closed to new replies.