Title: Archives by Category PHP Code
Last modified: August 18, 2016

---

# Archives by Category PHP Code

 *  Resolved [altexasgirl](https://wordpress.org/support/users/altexasgirl/)
 * (@altexasgirl)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/archives-by-category-php-code/)
 * Hi,
 * Maybe somebody on here knows the answer to my problem. Thanks in advance.
 * I’m trying to display a list of posts, and I’ve got the coding narrowed down 
   to just the ten most recent posts, but I would like to narrow the parameters 
   by a certain category.
 * Here is what I have so far:
 * `
    <?php get_archives('postbypost',"10",1,"","",""); ?>
 * I just want the ten most recent posts from a specific category to show. I know
   that I’ll have to include the category number, but I’m just not sure where.
 * Thanks so much!!!

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

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/archives-by-category-php-code/#post-493699)
 * With that tag you can not.
    Try something else, like a recentposts plugin where
   you can select which cat to show.
 *  Thread Starter [altexasgirl](https://wordpress.org/support/users/altexasgirl/)
 * (@altexasgirl)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/archives-by-category-php-code/#post-493700)
 * great – I’ll look into that – do you have any suggestions on which one to use?
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/archives-by-category-php-code/#post-493704)
 * I use this one on several blogs…
    [http://www.coffee2code.com/archives/2004/08/27/plugin-customizable-post-listings/](http://www.coffee2code.com/archives/2004/08/27/plugin-customizable-post-listings/)
 *  Thread Starter [altexasgirl](https://wordpress.org/support/users/altexasgirl/)
 * (@altexasgirl)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/archives-by-category-php-code/#post-493707)
 * Perfect – That did the trick! Thanks so much! Merry Christmas

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

The topic ‘Archives by Category PHP Code’ is closed to new replies.

## Tags

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

 * 4 replies
 * 2 participants
 * Last reply from: [altexasgirl](https://wordpress.org/support/users/altexasgirl/)
 * Last activity: [19 years, 5 months ago](https://wordpress.org/support/topic/archives-by-category-php-code/#post-493707)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
