• Resolved Kate

    (@katie1)


    Is is possible to have (2)comment templates running on one wordpress install?

    I need one comment template (default will do) for all categories and their specific sub-categories and another comment template designed strictly for one specific category and its sub-categories?

    I’ve tried designing my own comment template – actually I just copied the default one, changed the HTML wording and renamed it comments-review.php then FTP into my theme folder. I changed the call from <?php comments_template(); ?> to <?php include(TEMPLATEPATH . '/comments-review.php'); ?> in the category.php and sub-category.php template and it worked, sort of.

    I got the comment template form to come up but it displays NO COMMENTS. If I check the specific category.php info section, the comments are registering (ie: 2comments) and clickable, but when I’m re-directed to the comments section I get the form but still no comments.

    However, if I change the template call back to the original code <?php comments_template(); ?> I get everything (form and comments) – but not the new design wording.

    Can someone PLEASE help me with this issue.

    Thank for you help.

Viewing 10 replies - 1 through 10 (of 10 total)
  • error

    (@error)

    Just call comments_template with your other file, e.g. comments_template('/comments-review.php'); and that’s it. You need the / at the beginning. Enjoy!

    Thread Starter Kate

    (@katie1)

    Happy Christmas it worked like a charm!

    You are brilliant, error. Thanks for your input.!

    Sorry – I must be bit dense but I’m trying to do this and I can’t follow the above…

    could you walk me thorugh it again?

    thanks!
    Frank

    Thread Starter Kate

    (@katie1)

    If you want 2 comment templates in your site; then simply copy the existing comment template in its entirety; remane it comments-x or whatever, ftp into your current theme directory and then call this new comment template by simply changing the existing code call <?php comments_template(); ?> in whatever relevant file you want: single category.php or author.php or whatever, with the new comment template name.

    If you change it in single.php, and you do not have other template files, then you will get this newer version instead of the existing one.

    ie: changed comment code call
    <?php include (TEMPLATEPATH . /'comments-x.php'); ?>

    I use two comment templates; one for everyday stuff and commenting, and another fully customised for Reviews as I wanted the words: add your Review; 2 Reviews, etc to show up in the comment output on posts AND the comment template without destroying the existing generic one.

    I use this customised review comment template on a single category.php, namely; Reviews, so that it isn’t picked up elsewhere.

    Once you have it being pulled up, where you want it to be displayed, you can then change whatever html (or php output) you want to reflect what it is you’re attempting to achieve. I changed headers and stuff so that it reflects Reviews by members.

    Hope this helps.

    brilliant, thanks a million – I’m off to try it!

    thanks for the simple and concise explanation!

    Your instructions were really clear and made it simple to follow, the only thing was I had to go back to error’s comment to realise the changed comment code call had to be:

    <?php comments_template('/enquiries.php'); ?>

    Thanks again for your help!

    Thread Starter Kate

    (@katie1)

    My mistake – you are right, frankp

    The code should be <?php comments_template('/comments-review.php'); ?>

    Glad I could help ??

    Is this something that will still appear on the Dashboard once you’ve made a comment?

    I made the mistake of choosing Page with Comments Template as my For Admins Only template. One admin made a comment, and the link appeared on the Dashboard. I forgot about the Dashboard thing. Password-protecting the page didn’t work at all. Because of the commenting part. Which happens to be an important aspect of that section.

    Thread Starter Kate

    (@katie1)

    @can – can you please start a new thread.

    Thanx

    Oh, sorry. I realized, too late, that this topic has already been resolved.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘2 comments templates’ is closed to new replies.