Title: Custom post type sub post template
Last modified: August 19, 2016

---

# Custom post type sub post template

 *  [tta](https://wordpress.org/support/users/tykho/)
 * (@tykho)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/custom-post-type-sub-post-template/)
 * Hello,
 * I’m doing some work with some custom post type pages, and I’ve noticed that I’m
   having some trouble using templates specified for the sub pages.
 * I’m using single-event.php for the “event” post type I’ve registered.
    I’ve set
   that post type to be hierarchal to use it like pages, where I can create a sub
   post(page). Now if I want to use a specific template for one specific sub page,
   how would I go about?
 * Using a template file doesn’t seem to work, as the drop down menu does not appear
   on the custom post type edit page, only on normal page edit.
 * So in short, I’d wish to use a template for a subpage of my custom post type 
   event.
 * Something I’ve totally missed?
 * Thank you

Viewing 1 replies (of 1 total)

 *  Thread Starter [tta](https://wordpress.org/support/users/tykho/)
 * (@tykho)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/custom-post-type-sub-post-template/#post-1682475)
 * Hmh. Unless there is another easy solution to my problem… I guess I could try
   something like this.
 *     ```
       <?php
       if (is_single('program')) {
       	include (TEMPLATEPATH . '/program.php');
       }
       elseif {
       // do whatever else depending on what site, like the_content();
       }
       ?>
       ```
   
 * And in program.php set up whatever is going to show on the program page.
 * Since each events program page will have the same slug (site/events/event-example/
   program/)

Viewing 1 replies (of 1 total)

The topic ‘Custom post type sub post template’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [tta](https://wordpress.org/support/users/tykho/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/custom-post-type-sub-post-template/#post-1682475)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
