Forums

comment list on index page but the form (4 posts)

  1. lizzier
    Member
    Posted 5 months ago #

    Hi,
    I wonder if anyone could help, I have searched everywhere for hours now .. I would like to add the list of comments on the index page. I've have added: <?php global $withcomments; $withcomments = 1; ?>
    to the: <div class="entry-content">
    just above: <?php endif; ?> and it works great, but I don't want the comment form just the comments because the comment link is there which is how I want it.. I do need the comment for for the post though..
    Thanks

  2. SwansonPhotos
    Member
    Posted 5 months ago #

    This Codex article on get_comments may help you apply the necessary parameters. Typically, get_comments is used in conjunction with a theme's comments template or comments-paged file(s) and styled with CSS as desired.

  3. lizzier
    Member
    Posted 5 months ago #

    I've switched out the
    <?php global $withcomments; $withcomments = 1; ?> to
    <?php get_comments( $args ); ?>
    but it's still showing the actual comment form..I need the form on the posts but not on the index page posts.. thanks though.

  4. lizzier
    Member
    Posted 5 months ago #

    actually this did'nt work..
    <?php get_comments( $args ); ?>
    my mistake so this does
    <?php global $withcomments; $withcomments = 1; ?>

    I just need to know how to remove the comment form.. only on the index page not the other posts.
    If any one can help.
    Thanks

Reply

You must log in to post.

About this Topic