[resolved] Comments won't display in my archive.php page, need help... (3 posts)

  1. Spencer Hill
    Posted 5 years ago #

    So I can't seem to get comments to display on my archive.php page (the following code is actually from loop-archive.php which is included into archive.php in accordance with the function already built into twenty-ten)

    [code moderated according to forum rules - please use the pastebin]

  2. Michael
    Forum Moderator
    Posted 5 years ago #

    for good reasons, showing comments and comment for is suppressed by default for multi-post templates.

    (comment pagination will not work, reply will not work, the page might take longer to load ...)

    if you are aware of the limitations, you could overwrite the default (not recommended) by adding:

    <?php if(is_archive()){ global $withcomments; $withcomments=1; } ?>

    before the line with comments_template('',true);

  3. Spencer Hill
    Posted 5 years ago #

    Nice! Thanks for the explanation, that makes sense. And your solution worked perfectly. Thanks again!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.