#18859 closed enhancement (fixed)
Single theme template for custom post by slug
Reported by: | ericjuden | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 3.3 |
Component: | Themes | Keywords: | has-patch commit |
Focuses: | template | Cc: |
Description
I was working on adding a custom template for an individual post in my custom post type and discovered that you could only make a single-{post-type}.php. This patch adds the ability to make single-{post-type}-{slug}.php
It's pretty straight forward, and only adds 1 line of code to wp-includes/theme.php
Attachments (6)
Change History (17)
#2
@
13 years ago
- Component changed from Post Types to Template
- Keywords dev-feedback added; needs-testing removed
+1 from me.
Pages and Taxonomies are supporting slugs.
#4
@
13 years ago
- Version changed from 3.4 to 3.3
Version field indicates when the enhancement was initially suggested.
#6
@
12 years ago
I just updated the patch. The get_single_template() function was moved into wp-includes/template.php as of WordPress 3.4.
#7
@
12 years ago
- Cc lol@… added
I'd like this as well, or at the very least {post_type}-{slug}.php like pages get.
#9
@
9 years ago
- Keywords commit added; dev-feedback removed
- Milestone changed from Awaiting Review to 4.4
It shall be done.
Note: See
TracTickets for help on using
tickets.
wp-includes-theme.php.patch