Possible Duplicate:
single-{$post_type}-{slug}.php for custom post types
I have registered a Custom Post Type named conference
with the attribute:
'hierarchical' => true
In the backend admin, I created this nested post hierarchy for my conference
posts:
Conference: Finding Vision (slug: 2011-finding-vision)
- Schedule (slug: 2011-finding-vision/schedule)
- Speakers (slug: 2011-finding-vision/speakers)
Conference: Returning to Basics (slug: 2012-returning-to-basics)
- Schedule (slug: 2012-returning-to-basics/schedule)
- Speakers (slug: 2012-returning-to-basics/speakers)
etc...
I know I can use single-conference.php
as a default template for any of my conference
post types. This works well for the parent conference posts.
My Question: Is there a default template that I can use to target posts that are child posts of a conference
post?
Is there a way to have WordPress load single-conference-speakers.php
or conference-speakers.php
by default when rendering the url 2012-returning-to-basics/speakers
?
With pages, this works. If I have a page with a slug of about
, then I know I can make a template with page-about.php
to have the WordPress Template Hierarchy use that template as a default template.
Does the equivalent exist for custom post types?
single-$posttype.php
.