Comments #No not showing up correctly
-
Hi all,
I’m currently having the problem on my site ( Site ) where any posts that have comments on, in (index.php) homepage in the loop it is showing all articles having “No Comments” insted of “% comments” yet if you click on the post then there will be.
Heres my index.php
<?php get_header(); ?> <div class="pagetitle_live">Latest News</div> <div class="fixed"></div> <br> <?php $options = get_option('inove_options'); if (function_exists('wp_list_comments')) { add_filter('get_comments_number', 'comment_count', 0); } ?> <?php if ($options['notice'] && $options['notice_content']) : ?> <div class="post" id="notice"> <div class="content"> <?php echo($options['notice_content']); ?> <div class="fixed"></div> </div> </div> <?php endif; ?> <?php if (have_posts()) : while (have_posts()) : the_post(); update_post_caches($posts); ?> <?php foreach((get_the_category()) as $cat) $id = $cat->cat_ID; ?> <div class="item"> <a href="<?php the_permalink() ?>"><img src="https://www.ibbuk.co.uk/wp-content/uploads/pics/<?php $image = get_post_meta($post->ID, 'postuserpic', true); ?><?php echo $image;?>" alt="<?php the_title(); ?>" width="170" height="100" class="avatar" border="0"></a> <div class="title"><?php if ($id == 1) { ?> <font color="#d2e8f1"><b>Views</b></font> <?php } elseif ($id == 13) { ?><font color="#db332f"><b>Site ?</b></font><?php } ?><a href="<?php the_permalink() ?>"><strong><?php the_title(); ?></strong></a></div> <div class="desc"><?php the_excerpt(); ?></div> <div class="info"><span class="date"><?php global $post; $thePostID = $post->ID; $singlenotice = simple_fields_get_post_value($thePostID, "Day", true); if($singlenotice) { ?><?php echo $singlenotice; ?><?php } ?></span><span class="more"><a href="<?php the_permalink() ?>">Read More</a></span> <span class="comment_number"><?php comments_number('No Comments','1 Comment','% Comments'); ?></span></div> <br class="hide"><br class="hide"> </div><!--close article--> <br> <?php endwhile; else : ?> <div class="errorbox"> <?php _e('Sorry, no posts matched your criteria.', 'inove'); ?> </div> <?php endif; ?> <div id="pagenavi"> <?php if(function_exists('wp_pagenavi')) : ?> <?php wp_pagenavi() ?> <?php else : ?> <span class="newer"><?php previous_posts_link(__('Newer Entries', 'inove')); ?></span> <span class="older"><?php next_posts_link(__('Older Entries', 'inove')); ?></span> <?php endif; ?> <div class="fixed"></div> </div> <?php get_footer(); ?>
Any help?
IF you requrie any more code please say and i’ll post it
Cheers
James
- The topic ‘Comments #No not showing up correctly’ is closed to new replies.