Forums

Create Custom Comments.php (3 posts)

  1. mcserverreview
    Member
    Posted 1 year ago #

    <?php

    if (is_category('ratings')) {
    comments_template('/comments45.php');
    }

    else {
    comments_template();
    }

    ?>`

    I want my comments.php to be different if it sees that the post is number 45 or 'ratings'. This what I have posted here is within the single.php file and it currently does not work. My overall goal is to change some of the wording from comments to review in the text and have the order reversed.

    Am I going about this the wrong way or I am right and having some syntax errors.

    Appreciate the assistance

  2. alchymyth
    The Sweeper
    Posted 1 year ago #

    in single post, try and use in_category()

    http://codex.wordpress.org/Function_Reference/in_category

  3. mcserverreview
    Member
    Posted 1 year ago #

    That worked, thanks! :D

Topic Closed

This topic has been closed to new replies.

About this Topic