1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Wordpress Help] In Thesis themes, how to make comments show by default?

Discussion in 'Web Design' started by BlackSeng, Dec 26, 2009.

  1. BlackSeng

    BlackSeng Jr. VIP Jr. VIP

    Joined:
    Mar 5, 2009
    Messages:
    1,963
    Likes Received:
    3,519
    Occupation:
       
    Location:
    SG50
    If visitors wants to see the comments of a post, they will need to click on the "Show Comments" link.

    Is there a way to just show the comments by default without needing the user to click the link?
     
  2. webchick11

    webchick11 Newbie

    Joined:
    Feb 24, 2009
    Messages:
    37
    Likes Received:
    12
    Location:
    US
    Try this in the index.php of the theme:

    Code:
    <div class=?post-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) { ?>
       <li>&lt?php comment_author_link(); ?><br /><?php comment_excerpt(); ?></li>
      <?php } ?>
     <?php } ?>
      </ul>
    <?php } else { ?>
     <span class="comment">No comments so far</span>
    <?php } ?>
    </div>
     
  3. BlackSeng

    BlackSeng Jr. VIP Jr. VIP

    Joined:
    Mar 5, 2009
    Messages:
    1,963
    Likes Received:
    3,519
    Occupation:
       
    Location:
    SG50
    Thanks.

    Well, it didn't work.

    But thanks for the help! I will be switching to xSite pro template soon.