Title: query posts function breaking archive categories
Last modified: August 20, 2016

---

# query posts function breaking archive categories

 *  Resolved [ekajatik](https://wordpress.org/support/users/ekajatik/)
 * (@ekajatik)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/query-posts-function-breaking-archive-categories/)
 * I am using this additional snippet on my archive page:
    `<? query_posts('showposts
   =30'); ?>` but it is changing the archive to render all posts in date order, 
   not the category of archive.

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/query-posts-function-breaking-archive-categories/#post-2172069)
 * Look at using
 *     ```
       <? query_posts($query_string . '&posts_per_pate=30'); ?>
       ```
   
 * See:
    [http://codex.wordpress.org/Function_Reference/query_posts#Usage_Note](http://codex.wordpress.org/Function_Reference/query_posts#Usage_Note)
   [http://codex.wordpress.org/Class_Reference/WP_Query#Pagination_Parameters](http://codex.wordpress.org/Class_Reference/WP_Query#Pagination_Parameters)
 * [edit fixed code]
 *  Thread Starter [ekajatik](https://wordpress.org/support/users/ekajatik/)
 * (@ekajatik)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/query-posts-function-breaking-archive-categories/#post-2172105)
 * Got it, thanks.

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

The topic ‘query posts function breaking archive categories’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [ekajatik](https://wordpress.org/support/users/ekajatik/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/query-posts-function-breaking-archive-categories/#post-2172105)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
