Need to re-enable comments - need help with code
I had some work done on my wordpress site. I had asked that the PAGES have nowhere where comments could be posted, as well as ensure the Comments Closed did not show up on the page. That was done.
Unfortunately, my POSTS no longer have comment boxes showing up either, and no one can comment on my blog posts.
I don't know how to fix this, and where. Thanks coming your way. let me know if you need more info.
Here is the code from my editor for the Comments.php
<?php
$comment_posts = get_option('woo_comment_posts');
if (empty($comment_posts) || $comment_posts < 1) $comment_posts = 5;
global $wpdb;
$sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID,
comment_post_ID, comment_author, comment_author_email, comment_date_gmt, comment_approved,
comment_type,comment_author_url,
SUBSTRING(comment_content,1,50) AS com_excerpt
FROM $wpdb->comments
LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID =
$wpdb->posts.ID)
WHERE comment_approved = '1' AND comment_type = '' AND
post_password = ''
ORDER BY comment_date_gmt DESC LIMIT ".$comment_posts;
$comments = $wpdb->get_results($sql);
$output = $pre_HTML;
foreach ($comments as $comment) {
?>
<li>
<?php echo get_avatar( $comment, '35' ); ?>
<a href="<?php echo get_permalink($comment->ID); ?>#comment-<?php echo $comment->comment_ID; ?>" title="on <?php echo $comment->post_title; ?>">
<?php echo strip_tags($comment->comment_author); ?>: <?php echo strip_tags($comment->com_excerpt); ?>...
</a>
<div style="clear:both"></div>
</li>
<?php
}
?>
This is the code from the single.php
<?php get_header(); ?>
<!-- Middle Starts -->
<div id="middle-out-top">
<div id="middle-out-bottom">
<div id="middle-content" class="single">
<div id="middle-content-bottom">
<!-- Content Starts -->
<div id="content" class="wrap">
<div class="col-left">
<div id="main-content">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<!-- Single Post Starts -->
<div class="page post wrap">
<?php if (get_option('woo_image_single') == "false") woo_get_image('image',get_option('woo_single_width '),get_option('woo_single_height'),'thumbnail alignright'); ?>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<p class="post-details"><?php _e('Posted on',woothemes); ?> <?php the_time('d. M, Y'); ?> <?php _e('by',woothemes); ?> <?php the_author_posts_link(); ?> <?php _e('in',woothemes); ?> <?php the_category(', ') ?></p>
<?php if ( in_category($GLOBALS[vid_cat]) ) echo woo_get_embed('embed','550','360'); ?>
<?php the_content(); ?>
<?php the_tags('<p class="tags">Tags: ', ', ', '</p>'); ?>
</div>
<!-- Single Post Ends -->
<!-- Content Ad Starts -->
<?php if (get_option('woo_ad_content_disable') == "false") include (TEMPLATEPATH . "/ads/content_ad.php"); ?>
<!-- Content Ad Ends -->
</div>
<div id="comments">
<?php comments_template(); ?>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.',woothemes); ?></p>
<?php endif; ?>
</div>
</div>
<div class="col-right">
<?php get_sidebar(); ?>
</div>
</div>
<!-- Content Ends -->
</div>
</div>
</div>
</div>
<!-- Middle Ends -->
<?php get_footer(); ?>
http://www.TheOnlineChick.com