Title: Loop for PAGES???
Last modified: August 18, 2016

---

# Loop for PAGES???

 *  [thomask](https://wordpress.org/support/users/thomask/)
 * (@thomask)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/loop-for-pages/)
 * I need to show category page with list of pages (not post) in that category (
   i got a plugin for asigning categories to pages), but i do not know how to do
   loop for pages.
    this does not work: if (have_posts()) : while (have_posts()):
   the_post();
 * and something like have_pages afaik does not exist

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/loop-for-pages/#post-552065)
 * WordPress doesn’t allow Categories for Pages.
 * Are you using some kind of plugin?
 *  Thread Starter [thomask](https://wordpress.org/support/users/thomask/)
 * (@thomask)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/loop-for-pages/#post-552074)
 * yes I do, it simpy uses posts Categories (the same table structure). But it does
   has only function to show titles of pages from that category. But i guess it 
   does not matter, it may be a question of how to show them for pages made in some
   month (archive) etc., the problem i got is about looping. The only function WP
   got for pages is probably wp_list_pages(), what is function to show links to 
   pages, but not their excerpts.
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 2 months ago](https://wordpress.org/support/topic/loop-for-pages/#post-552096)
 * If you want to put a loop in a page template, you need to call query_posts() 
   to select the posts that you want to loop through first.

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

The topic ‘Loop for PAGES???’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * Last activity: [19 years, 2 months ago](https://wordpress.org/support/topic/loop-for-pages/#post-552096)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
