Title: Custom Archive Problem
Last modified: August 18, 2016

---

# Custom Archive Problem

 *  [bismag](https://wordpress.org/support/users/bismag/)
 * (@bismag)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/custom-archive-problem/)
 * Hey everyone:
 * I was messing around all day on my new site yesterday and couldn’t fix one problem
   I’m having … hopefully someone can help me.
 * I have several Child Pages that run off of their own page.php. How do I code 
   this page to display a custom archive for a particular category? I tried copying
   and modifying code from the standard archive.php and even played around in support
   for a while, but can not find a solution.
 * The site is [http://www.bismag.com](http://www.bismag.com). If you click on the‘
   MUSIC’ link under the header you see a second navigation bar pop-up that displays
   the Child Pages [eventually every page will do this]. If you click on the ‘MUSIC
   REVIEWS’ Child Page you’ll see very little. I want this to show a standard archive
   for category 4 only. I can’t figure out how to manipulate the wp_query for my
   own page. Any suggestions will be greatly appreciated.
 * Thanks,
    Nick

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

 *  Thread Starter [bismag](https://wordpress.org/support/users/bismag/)
 * (@bismag)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/custom-archive-problem/#post-603581)
 * Ahh! Help please! I was hoping this wouldn’t be too difficult and I was just 
   overlooking something.
 *  [Jauhari](https://wordpress.org/support/users/jauhari/)
 * (@jauhari)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/custom-archive-problem/#post-603865)
 * I don’t know way, but this support really slow to replied 🙁 I want to know how
   to do this also.
 *  [davidemorgan](https://wordpress.org/support/users/davidemorgan/)
 * (@davidemorgan)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/custom-archive-problem/#post-603866)
 * Add to your theme’s page.php:
 *     ```
       <?php if (is_page('name of page')){
       //do stuff
       } elseif (is_page('name of another page')){
       //do different stuff
       } elseif (is_page('name of yet another page')){
       //do more different stuff
       } else {
       //what to do if it isn't one of the previously mentioned pages
       } ?>
       ```
   
 * What the “do stuff” is depends on what you want to do.
 * If you want to be fancy and show an excerpt of posts as well as the headlines
   for posts in the category or categories, you will need to use a second loop. 
   See the “multiple loops” section:
 * [http://codex.wordpress.org/The_Loop](http://codex.wordpress.org/The_Loop)
 * Otherwise, to simply show a link to a related category or categories, you can
   use [wp_list_categories](http://codex.wordpress.org/Template_Tags/wp_list_categories).
   You will probably want to use the “include” parameter to set the category that
   displays with each page.
 * Hope that helps.
 * If anyone knows how to use wp_list_categories in an array to echo the category
   descriptions as well, that would be wonderful to know.

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

The topic ‘Custom Archive Problem’ is closed to new replies.

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [child pages](https://wordpress.org/support/topic-tag/child-pages/)
 * [custom archive](https://wordpress.org/support/topic-tag/custom-archive/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [davidemorgan](https://wordpress.org/support/users/davidemorgan/)
 * Last activity: [18 years, 6 months ago](https://wordpress.org/support/topic/custom-archive-problem/#post-603866)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
