Support » Themes and Templates » 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)
  • 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.