WordPress.org

Ready to get started?Download WordPress

Forums

Show comments on index.php ? (8 posts)

  1. yazerty
    Member
    Posted 7 years ago #

    Hello,

    I 'd like that comments of a post be juste after the post on the index.php. I'd like to show comments on index.php just after each post.

    But I don't want to have the form also. I don't want it on my index.php (too heavy).

    I 've put this in index.php in the posts loop, mais this doesn't work at all (nothing happends) :-( :

    <?php comments_template(); ?>

    How could I do to show comments of each post on the index.php (but no the form to post a comment) please :-?

  2. yazerty
    Member
    Posted 7 years ago #

    If I put this :

    <?php $wp_query->is_single = true; ?>
    <?php comments_template(); ?>

    this show the dafult comments template.

    Could I make another version of comments.php ? Could I use comments-popup to make it ?

  3. yazerty
    Member
    Posted 7 years ago #

    Mmm, that doesn't work at all with it, because <?php $wp_query->is_single = true; ?> show my posts on index.php like they were on the single page. So, it's bad for long posts :-/

    Is there anybody who have a solution please ??

  4. yazerty
    Member
    Posted 7 years ago #

    nobody :-( ?

  5. h9k
    Member
    Posted 7 years ago #

    I also wish to have comments listed after the post on the main page. This would be a great feature. somebody please hack :)

  6. moshu
    Member
    Posted 7 years ago #

    Well, if you read the posts above - the solution has been posted. Of course, as with every hack, there is a trade-off: if you define your main page as "single" the more link or excerpt will not work on it.

  7. moshu
    Member
    Posted 7 years ago #

    p.s.
    And if that's not enough... use the serach button:
    http://wordpress.org/search/comments+on+index?forums=1

  8. h9k
    Member
    Posted 7 years ago #

    i tried to follow but couldnt get it to work.
    i could possibly do with a more simple explanation with where to inject the code and on what php file.

Topic Closed

This topic has been closed to new replies.

About this Topic