Title: Problems with query_posts()
Last modified: August 19, 2016

---

# Problems with query_posts()

 *  [anaxyd](https://wordpress.org/support/users/anaxyd/)
 * (@anaxyd)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/problems-with-query_posts/)
 * Hello!
 * I am currently using the query_posts(); to list ut some of the latest posts in
   my footer.
 * Here is the line of code:
 * `<?php query_posts("category_name=projects");?`
 * But this will list up all of the posts in the category named projects. I want
   it to be reduced to 5. Is this possible to do?
 * With the `showposts=?` maybe?
 * I cant figure this out by myself, so all help will be appreciated! 🙂
 * Kind Regards,
    Vegard Brenden

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

 *  Thread Starter [anaxyd](https://wordpress.org/support/users/anaxyd/)
 * (@anaxyd)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/problems-with-query_posts/#post-820302)
 * Replies will be greatly appriciated! I really need this to work! 🙂
 *  [langsuyar](https://wordpress.org/support/users/langsuyar/)
 * (@langsuyar)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/problems-with-query_posts/#post-820305)
 * Try
 * `<?php query_posts("category_name=projects&showposts=5");?>`
 *  Thread Starter [anaxyd](https://wordpress.org/support/users/anaxyd/)
 * (@anaxyd)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/problems-with-query_posts/#post-820382)
 * Bah, it didn’t work..
 * EDIT: Thank you! I had a misspelling inside the code that you gave me, and when
   corrected, it works! THANKS! 😀

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

The topic ‘Problems with query_posts()’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [anaxyd](https://wordpress.org/support/users/anaxyd/)
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/problems-with-query_posts/#post-820382)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
