#18859 closed enhancement (fixed)
Single theme template for custom post by slug
| Reported by: | ericjuden | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Themes | Version: | 3.3 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: | template |
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
@
15 years ago
- Component Post Types → Template
- Keywords dev-feedback added; needs-testing removed
+1 from me.
Pages and Taxonomies are supporting slugs.
#4
@
14 years ago
- Version 3.4 → 3.3
Version field indicates when the enhancement was initially suggested.
#6
@
14 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
@
14 years ago
- Cc added
I'd like this as well, or at the very least {post_type}-{slug}.php like pages get.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
wp-includes-theme.php.patch