Title: Create Custom Comments.php
Last modified: August 19, 2016

---

# Create Custom Comments.php

 *  [mcserverreview](https://wordpress.org/support/users/mcserverreview/)
 * (@mcserverreview)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/create-custom-commentsphp/)
 * <?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

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/create-custom-commentsphp/#post-1988297)
 * in single post, try and use `in_category()`
 * [http://codex.wordpress.org/Function_Reference/in_category](http://codex.wordpress.org/Function_Reference/in_category)
 *  Thread Starter [mcserverreview](https://wordpress.org/support/users/mcserverreview/)
 * (@mcserverreview)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/create-custom-commentsphp/#post-1988366)
 * That worked, thanks! 😀

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Create Custom Comments.php’ is closed to new replies.

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [comment](https://wordpress.org/support/topic-tag/comment/)
 * [Comments](https://wordpress.org/support/topic-tag/comments/)
 * [comments.php](https://wordpress.org/support/topic-tag/comments-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [mcserverreview](https://wordpress.org/support/users/mcserverreview/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/create-custom-commentsphp/#post-1988366)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
