#41742 closed enhancement (invalid)
New conditional tag to decide if a post has a custom template
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.9 |
Component: | Themes | Keywords: | |
Focuses: | template | Cc: |
Description
Something like is_custom_template()
.
The rationale:
- it can be used in
template-loader.php
to aid in clarifying the Template Hierarchy for attachments, posts, and pages. - in a theme that wants to keep things DRY and redirects all template-xxx.php files to index.php, have a way to enquire if the post has a custom template — this unlocks alternative templating strategies (such as when using Timber).
Change History (4)
Note: See
TracTickets for help on using
tickets.
Was the closing intentional?
There are, however, is_page_template() and get_page_template_slug() functions that should cover this.