Title: Missing comment function on template
Last modified: August 19, 2016

---

# Missing comment function on template

 *  [skritz](https://wordpress.org/support/users/skritz/)
 * (@skritz)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/missing-comment-function-on-template/)
 * Dear WordPresser,
 * I made a second page template. The normal page template works fine. The new on
   is nearly the same, except, that it filters posts from a category and shows the
   content. It’s also doing it’s job as it shall.
 * But the comments function won’t show up in the new page template.
 * Anybody an idea?
 * Thank’s a lot!
 * Here’s the template code:
 *     ```
       <?php
       /**
        * Template Name: Video
        */
   
       get_header(); ?>
   
       <div id="content">
   
           <?php query_posts('cat=5');?>
   
       	<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
   
                       <h2><?php the_title(); ?></h2>
                       <?php twentyten_posted_on(); ?>
   
                       <?php the_content(); ?>
   
                   <?php comments_template( '', true ); ?>
   
           <?php endwhile; ?>
       </div><!-- #content -->
   
       <?php get_sidebar(); ?>
       <?php get_footer(); ?>
       ```
   

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/missing-comment-function-on-template/#post-1943434)
 * try and add:
    `global $withcomments; $withcomments = true;` before: `comments_template('',
   true );`
 *  Thread Starter [skritz](https://wordpress.org/support/users/skritz/)
 * (@skritz)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/missing-comment-function-on-template/#post-1943451)
 * Perfect,
 * it works fine.
 * Thanks alchymyth.

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

The topic ‘Missing comment function on template’ is closed to new replies.

## Tags

 * [comment](https://wordpress.org/support/topic-tag/comment/)
 * [page](https://wordpress.org/support/topic-tag/page/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [skritz](https://wordpress.org/support/users/skritz/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/missing-comment-function-on-template/#post-1943451)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
