• I am trying to add the comment_template for a category page. It is essentially another index.php. I was hoping to be be able to pull the comment template for that page. I know it has to be in the loop so I assembled some code to mimic what is happening on a single.php page.

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>		
    
    <?php comments_template(); // Get wp-comments.php template ?>
    <?php endwhile; ?>
    		<?php endif; ?>

    I was wondering if there is a way to allow comments on the category level.

Viewing 3 replies - 1 through 3 (of 3 total)
  • It could be possible the way you suggested although i’m not sure, so maybe somebody could clarify this.

    But one alternative I can think of would be to create a page, then assign a template to the page which loops through the categorys posts, and have comments turned on the page. So essentially the page would act as the category page, and have commments. You might have a problem with having the same slug though depending on how it’s set-up.

    Thread Starter PBP_Editor

    (@pbp_editor)

    Yeah I was thinking off moving those to a page with a custom template. But before I did that I was curios about a hack to get comments on the category level…

    Yeah maybe somebody else can throw their 2pence in, but afaik they are linked to posts/pages..here was another discussion I found on the subject:

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Comments for a category page’ is closed to new replies.