Number of Comments Wrong
-
Can anybody tell me why this is not showing the correct number of comments? It shows 0 comments for all posts even though there are comments.
<?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="blog-entry" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title() ?></a></h2> <?php the_content('', TRUE, false); ?> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" class="more-link">Continue reading…</a> <p class='blog-meta' style='float: right; margin-top: -35px; position:relative;'><?php the_time('M j') ?> | <?php comments_popup_link('0','1','%','','none'); ?> Comments </div> <?php endwhile; ?> <?php else : ?> <div class="blog-entry" id="post-<?php the_ID(); ?>"> <h2>Missing</h2> The page your looking for is not here. It may have never been here or it could have been renamed or moved. You can always try searching again. </div> <?php endif; ?> <div class="recent-entries"> <h2><a href="#">Recent Entries</a></h2> <table width="98%" cellpadding="0" cellspacing="0" border="0"> <?php $myposts = get_posts('numberposts=6'); foreach($myposts as $post) : ?> <tr> <td width="425px"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> in <?php the_category(', ') ?></td> <td align='left'><?php the_time('M j') ?></td> <td align='left'><?php comments_popup_link('0','1','%','','none'); ?></td> </tr> <?php endforeach; ?> </table> </div>
I’ve tried several comment tags including comments_num and just linking it, etc. They all still show zero.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Number of Comments Wrong’ is closed to new replies.