Title: Adding comments to multiple pages? using
Last modified: August 22, 2016

---

# Adding comments to multiple pages? using

 *  [Radsterdriver](https://wordpress.org/support/users/radsterdriver/)
 * (@radsterdriver)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/adding-comments-to-multiple-pages-using/)
 * HI,
 * I am using this code to add a comments to one of my pages. Do I need to add all
   lines of code for each new page that requires comments or is there a way to specify
   multiple pages within these lines of code.
    Thanks!!!
 * <?php
    if (is_page(183)) { ?> <div class=”et_pb_row”> <?php comments_template(”,
   true ); } ?> </div>

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

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/adding-comments-to-multiple-pages-using/#post-5388922)
 * Add this part:
 *     ```
       <?php
       comments_template( '', true );
       ?>
       ```
   
 * to your page template(s) and comments will appear for all pages that are based
   on that template. You don’t need the conditional if is page 183 when you do it
   this way, assuming you want comments on all pages using this template. Use a 
   different template for pages that should not have comments.
 * You should create your own template based on your theme’s template and use that
   for all of your pages with comments. This way your modification is not lost when
   the theme updates. If you anticipate other modifications, create a child theme
   to contain them all and keep them protected.
 *  Thread Starter [Radsterdriver](https://wordpress.org/support/users/radsterdriver/)
 * (@radsterdriver)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/adding-comments-to-multiple-pages-using/#post-5388947)
 * Hi,
    I’ve tried it but nothing changed.
 * I’ve made a new template.
 * Where should the code be placed?
 * Should it replace ay other code?
 * thanks.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/adding-comments-to-multiple-pages-using/#post-5388964)
 * The code goes on the template file that is specified when you create pages. The
   default one is page.php. Place the code where ever you want the comments to appear.
   The code is intended to go amongst HTML. If where you want the comments to appear
   is already PHP, do not add another <?php ?> block, just add the function call
   alone.
 * There is not any need to remove any other code, unless it’s doing something you
   do not want.
 * If you still are having trouble getting it working, set WP_DEBUG to true on your
   wp-config.php file. This will enable error messages to appear in your browser,
   telling you what and where there is a problem.

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

The topic ‘Adding comments to multiple pages? using’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 3 replies
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/adding-comments-to-multiple-pages-using/#post-5388964)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
