• Resolved happymedium

    (@happymedium)


    In reference to my blog (http://overeasy.be):

    New comments being posted to my blog entries are not showing up on the main page. To illustrate, the most recent entry on my blog (http://www.overeasy.be/?p=801) has a comment, but the main page still says “no comments”. Also weird is that the single-post for this entry says “no responses to…” even though there is a response right below it.

    If I go back a few pages in my archives (http://www.overeasy.be/?paged=4) the comments start showing up properly.

    I recently started using a new template, which I’m assuming is at least part of problem. I’ve only messed around with the code a little, and not in relevant areas. I’ve also tried to cut and paste sections of code from the other templates, but that hasn’t fixed anything.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    Add this code inside loop in index.php file:

    `<div class=”recent-comment”>
    <?php
    $comment_array = array_reverse(get_approved_comments($wp_query->post->ID));
    $count = 1;
    ?>

    <?php if ($comment_array) { ?>
    <span class=”comment”> <?php comments_number(‘No comment’,’1 comment’,’% comments’); ?></span> – Latest by:
    <ul class=”commentlist”>
    <?php foreach($comment_array as $comment){ ?>
    <?php if ($count++ <= 2) { ?>

    • <?php comment_author_link(); ?>
      <?php comment_excerpt(); ?>
    • <?php } ?>
      <?php } ?>

      <?php } else { ?>
      <span class=”comment”>No comment so far</span>
      <?php } ?>
      </div> `

      Thanks,

      Shane G.

    Thread Starter happymedium

    (@happymedium)

    That added a “comment excerpt” to the front page, but it still says there aren’t any comments.

    Thread Starter happymedium

    (@happymedium)

    Fixed it! Just had to deactivate some plugins.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘New comments not displayed on main page’ is closed to new replies.