Title: query_posts and paging
Last modified: August 18, 2016

---

# query_posts and paging

 *  [tomviolin](https://wordpress.org/support/users/tomviolin/)
 * (@tomviolin)
 * [20 years ago](https://wordpress.org/support/topic/query_posts-and-paging/)
 * I’ve seen several threads which appear to address this topic, yet don’t seem 
   to apply to my situation.
 * Briefly: I have a page that displays all posts from a given category (in this
   case Announcements). I thought I had it done by simply creating a custom “announcements.
   php” page template containing a
    `query_posts("cat=1");` right before **The Loop**,
   and then assigning my “Announcements” page to it.
 * All seemed well until I tried the “Next Page” link and then I just got a blank
   page. The URI of the initial page with posts on it is:
 *  `http://www.mysite.com/wp/?page_id=55`
 * and when I click the “Next page” link I get:
 *  `http://www.mysite.com/wp/?page_id=55&paged=2`
 * and all should be good, but I get a blank page instead.
 * Any ideas out there?

Viewing 1 replies (of 1 total)

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 12 months ago](https://wordpress.org/support/topic/query_posts-and-paging/#post-389904)
 * I don’t think the next/prev code works with Page templates.
    Why not to try to
   make the announcement page a Category Template? [http://codex.wordpress.org/Category_Templates](http://codex.wordpress.org/Category_Templates)

Viewing 1 replies (of 1 total)

The topic ‘query_posts and paging’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [moshu](https://wordpress.org/support/users/moshu/)
 * Last activity: [19 years, 12 months ago](https://wordpress.org/support/topic/query_posts-and-paging/#post-389904)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
