Title: the loop
Last modified: August 19, 2016

---

# the loop

 *  [oldfish](https://wordpress.org/support/users/oldfish/)
 * (@oldfish)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/the-loop-3/)
 * I was going to put this in advanced, but I can’t. anyway, I have been beating
   my head on the wall trying to find the logic in this.
 * How does “the loop” work?
 * I see there is the “have_posts()” function, and I can follow the PHP logic well
   enough, but I can’t seem to find the actual function.
 * Am I wrong to assume that “the loop” simply runs through all posts and allows
   you to pluck and choose the ones for display? Is there some magical condition
   that is hidden somewhere that makes it only select a certain group of posts to
   loop through?
 * Maybe I am missing it, but I cannot find a clear explanation of this anywhere
   in the codex.

Viewing 1 replies (of 1 total)

 *  [barbapapa](https://wordpress.org/support/users/barbapapa/)
 * (@barbapapa)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/the-loop-3/#post-971693)
 * there is also a while_have_post and a the_post and the 3 together create a loop

Viewing 1 replies (of 1 total)

The topic ‘the loop’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [barbapapa](https://wordpress.org/support/users/barbapapa/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/the-loop-3/#post-971693)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
