I’m at a loss to for a solution to my comments section not showing on my single post page. I’ve noticed that this page is not displaying any of the code below the post and tags sections. Would someone be willing to look at the code in the admin for me? I imagine it could be something simple to identify, as the site is organized nicely.
This is the only way I think the problem could be solved.
UPDATE UPDATE UPDATE. Here’s Single.php
<?php get_header(); ?>
<?php include ('page_header.php'); ?>
<?php include ('page_navigation.php'); ?>
<div id="page-content" class="clearfix">
<div id="content-container" class="clearfix">
<div id="main-content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if ( get_option('minimax_post_layout') == 'head-three' ) { ?>
<h2><?php the_title(); ?><em>Posted on <?php the_time('D, M d, Y') ?></em></h2>
<?php if ( has_post_thumbnail() ) { ?>
<div class="post-item-thumb-<?php echo get_option('minimax_post_layout'); ?>">
<?php the_post_thumbnail('thumb_post_3'); ?>
</div>
<?php } ?>
<?php } else { ?>
<?php if ( has_post_thumbnail() ) { ?>
<div class="post-item-thumb-<?php echo get_option('minimax_post_layout'); ?>">
<?php the_post_thumbnail('thumb_post_2'); ?>
</div>
<?php } ?>
<h2><?php the_title(); ?><em>Posted on <?php the_time('D, M d, Y') ?></em></h2>
<?php } ?>
<?php the_content(); ?>
<?php edit_post_link('Edit', '<br /><p>', '</p>'); ?>
<?php include ('post_related.php'); ?>
<div id="post-indexing"> <?php the_tags('<strong>Tagged as</strong> ',', ','+'); ?><br /><strong>Categorized as</strong> <?php the_category(', ','single'); ?></div>
<?php include ('post_author.php'); ?>
<?php comments_template(); ?>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no pages matched your criteria.'); ?></p>
<?php endif; ?>
</div><!-- end main-content -->
<?php include ('sidebar_post.php'); ?>
</div><!-- end content-container -->
<?php include ('footer_columns_posts.php'); ?>
</div><!-- end page-content -->
<?php get_footer(); ?>
Also, here’s the comments.php page:
<div id="comments">
<?php // Do not delete these lines
if (!empty($_SERVER['SCRIPT_FILENAME']) && '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.</p>
<?php
return;
}
}
/* This variable is for alternating comment background */
$oddcomment = 'class="alt" ';
?>
<!-- You can start editing here. -->
<?php if ($comments) : ?>
<h2>Comments <span>(<?php comments_number('No Responses', 'One Response', '% Responses' );?
>)</span></h2>
<ul class="commentlist">
<?php wp_list_comments('avatar_size=60&type=comment'); ?>
</ul>
<?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) : ?>
<div id="respond">
<h3><?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?></h3>
<div class="cancel-comment-reply">
<?php cancel_comment_reply_link(); ?>
</div>
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>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.</p>
<?php else : ?>
<div id="post-comment" class="clearfix">
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post"
id="commentform">
<fieldset>
<?php if ( $user_ID ) : ?>
<p>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">Log out »</a></p>
<?php else : ?>
<label for="author"><?php if ($req) echo "* "; ?>Your name:</label>
<input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22"
tabindex="1" />
<label for="email"><?php if ($req) echo "* "; ?>Mail (will not be published):</label>
<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>"
size="22" tabindex="2" />
<label for="url">Website</label>
<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22"
tabindex="3" />
<?php endif; ?>
<!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?
></code></small></p>-->
<label for="comment" class="comment">Your comment:</label>
<textarea name="comment" id="comment" class="comment" cols="61%" rows="10"
tabindex="4"></textarea>
<input name="submit" type="submit" class="submit" alt="Submit Comment" id="submit" tabindex="5"
value="Submit Comment" />
<input type="hidden" class="hide" name="comment_post_ID" value="<?php echo $id; ?>" />
<?php comment_id_fields(); ?>
<?php do_action('comment_form', $post->ID); ?>
</fieldset>
</form>
</div><!-- end post-comment -->
</div>
<?php endif; // If registration required and not logged in ?>
<?php endif; // if you delete this the sky will fall on your head ?>
</div>
Here is post_author.php
<?php if ( get_option('minimax_author') == 'yes' ) { ?>
<div id="author-desc" class="clearfix">
<?php the_author_image(); ?>
<h4>About the Author</h4>
<?php the_author_description(); ?>
</div>
<?php } ?>
There isn’t any function like
the_author_image()in WordPress. So, you have to remove<?php the_author_image(); ?>line from your
post_author.php. If you want to show author image , WordPress getting avatars from Gravatar. You can use get_avatar() to display author’s Gravatar.In shortly, use this :
instead of this :
<?php the_author_image(); ?>