Title: Random Posts (query_posts) doesn&#039;t display comments
Last modified: August 19, 2016

---

# Random Posts (query_posts) doesn't display comments

 *  [Quakebum](https://wordpress.org/support/users/quakebum/)
 * (@quakebum)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/random-posts-query_posts-doesnt-display-comments/)
 * I’ve created a custom template to display a random post page template for a particular
   category.
 * Here is my main loop:
 *     ```
       <?php query_posts('showposts=1&cat=3&orderby=rand');?>
       		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
          <?php the_content(); ?>
               <?php comments_template( '', true ); ?>
       		<?php endwhile; endif; ?>
       ```
   
 * But it doesn’t display the comment form.
 * When I include a reset query, it does include a comment form, but it is the comment
   for that particular post, not the comment form for the random post that is displayed.
 * How do I bring up the correct comment form with random posts?

The topic ‘Random Posts (query_posts) doesn't display comments’ is closed to new
replies.

## Tags

 * [Comments](https://wordpress.org/support/topic-tag/comments/)
 * [query](https://wordpress.org/support/topic-tag/query/)
 * [random posts](https://wordpress.org/support/topic-tag/random-posts/)

 * 0 replies
 * 1 participant
 * Last reply from: [Quakebum](https://wordpress.org/support/users/quakebum/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/random-posts-query_posts-doesnt-display-comments/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
