Title: Posting Specific Posts within main loop
Last modified: August 21, 2016

---

# Posting Specific Posts within main loop

 *  [janikknittle](https://wordpress.org/support/users/janikknittle/)
 * (@janikknittle)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/posting-specific-posts-within-main-loop/)
 * I’m slowly learning php and lost at this point. I’m setting up a site where we
   have sponsors that we would like to promote. We are using a masonry theme so 
   the idea is to incorporate a sponsor logo every nth post. The logos are currently
   posted as a status format but unless I change the date every time, they won’t
   remain in the same positions. I’d like them to automatically show up every nth
   post.
 * I figured this could be done a few ways. Assigning a category “Sponsor” and pulling
   from that, pulling form the status post format or creating an array of all the
   sponsors.
 * This is the basic loop used and currently what I’ve been trying.
 *     ```
       // Begin loop
                   while ( have_posts() ) : the_post();
                   $count++;
                   get_template_part( 'content', get_post_format() );
                   if ( $count%3==0 ) {
       		echo 'first element in array ';
                   }
                   endwhile; ?>
       ```
   
 * I’d like to be able to use the status post format that way others can easily 
   change logos/links/etc without too much difficulty. Is it possible to create 
   a loop that would do this? Post 3 normal posts, then 1 status/”sponsor” post,
   then 3 more posts, then the next sponsor post, etc?
 * Thanks!

 The topic ‘Posting Specific Posts within main loop’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [janikknittle](https://wordpress.org/support/users/janikknittle/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/posting-specific-posts-within-main-loop/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
