Title: posts in the single.php
Last modified: August 18, 2016

---

# posts in the single.php

 *  [marhoff](https://wordpress.org/support/users/marhoff/)
 * (@marhoff)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/posts-in-the-singlephp/)
 * Hello I’m new and I’ve problem with show posts on the curent post for exaplme
   I have code in single.php:
    (this is the post number f.e ‘p=5’) …. <?php if (
   have_posts()) : while (have_posts()) : the_post(); ?>
 * /*now i’d like show on this post another post and i do .*/
 * <?php if ($post->ID==5) : if(query_posts(‘p=7’)): the_post(); the_content(); 
   endif; endif;?>
    ….
 * <?php endwhile; ?><?php endif; ?>
    … /*and display me the post number 7 on post
   5 – that’s ok*/ /*but i want display another post also on post 31 and the same
   code above don’t display me another post contents – > why? */ /*i’ve treid use“
   multiple loops” but don’t work */ /* how add another post contents in this post?*/

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

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/posts-in-the-singlephp/#post-289260)
 * Isn’t that an oxymoron? – to have more posts on _single_.php 😉
 *  Thread Starter [marhoff](https://wordpress.org/support/users/marhoff/)
 * (@marhoff)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/posts-in-the-singlephp/#post-289295)
 * Yes that’s paradox !
    …… /*this post appear */ <?php if ($post->ID==5) : if(query_posts(‘
   p=7’)): the_post(); the_content(); endif; endif;?>
 * /* bottom – this post disapper */
    <?php if ($post->ID==5) : if(query_posts(‘
   p=23’)): the_post(); the_content(); endif; endif;?>
 * /*i want display display the content two post number 7 and 23 on the post 5 –
   what am i doing wrong ? thanks for advice */

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

The topic ‘posts in the single.php’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [marhoff](https://wordpress.org/support/users/marhoff/)
 * Last activity: [20 years, 5 months ago](https://wordpress.org/support/topic/posts-in-the-singlephp/#post-289295)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
