Title: Help with query_posts
Last modified: August 18, 2016

---

# Help with query_posts

 *  [guischarf](https://wordpress.org/support/users/guischarf/)
 * (@guischarf)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/help-with-query_posts-1/)
 * Hello,
 * I am trying to create a home page in which there is block of text at the beginning.
   This block of text should display the content of a specific page. The rest of
   the home page should display as usual. For example:
 *     ```
       +--------------------------------------------+
       |                 HEADER                     |
       +--------------------------------------------+
       |              block of text                 |
       |    displays content of page_id = 8         |
       +--------------------------------------------+
       |                  index.php                 |
       |          displays rest of the posts        |
       |             as an out-of-the-box           |
       |                  install                   |
       +--------------------------------------------+
       |                   footer                   |
       +--------------------------------------------+
       ```
   
 * Im am using this in the block of text to display page_id 8 content:
 *     ```
       <?php query_posts($query_string . "&page_id=8"); ?>
       <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
   
          <div class="entry">
   
             <?php the_content('<p class="serif">Leer más &raquo;
       '); ?>
   
          </div>
   
       <?php endwhile; endif; ?>
       <?php rewind_posts(); ?>
       ```
   
 * and then, in index:
 *     ```
       <?php if (have_posts()) : ?>
       <?php while (have_posts()) : the_post(); ?>
       ...usual stuff...
       <?php endif; ?>
       <?php endwhile; ?>
       ```
   
 * This does not work because, even though page content is correctly shown in the
   block of text, page_id 8 content gets duplicated below, in the index section,
   and nothing else shows.
 * Any ideas how to do this ?
 * Thanks

The topic ‘Help with query_posts’ is closed to new replies.

## Tags

 * [query_posts](https://wordpress.org/support/topic-tag/query_posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [guischarf](https://wordpress.org/support/users/guischarf/)
 * Last activity: [18 years, 10 months ago](https://wordpress.org/support/topic/help-with-query_posts-1/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
