Documentation-Issue-Tracker
Documentation-Issue-Tracker copied to clipboard
Theme Developer Handbook: Clarify documentation that page-templates folder is not necessary for theme templates
Issue Description
I am moving this from Trac: https://core.trac.wordpress.org/ticket/46490
Hi,
While browsing Page Templates in the Theme Handbook to refresh myself on recommend theme structures and page templates; I became a little confused and suggest some clarification for users.
The File Organization of Page templates section initially confused me because it states "WordPress recognizes the subfolder page-templates." This is misleading and can give readers the impression that WordPress would only recognize that specific folder name.
As of WordPress 3.4, any subdirectory folder can be used (as far as I know).
I suggest rephrasing it something like to be can be placed in any subdirectory but suggest a folder like page->templates or templates. You cannot use a 2nd-level subdirectory (e.g. pages/templates/).
URL of the Page with the Issue
https://developer.wordpress.org/themes/template-files-section/page-template-files/
Section of Page with the issue
Why is this a problem?
Suggested Fix
Heads up @kafleg @carolinan @TeBenachi - the "themes" label was applied to this issue.
Heads up @WordPress/docs-issues-coordinators, we have a new issue open. Time to use 'em labels.
We can add something like this!?
Page templates can be stored in any first-level subdirectory (e.g., templates/ or page_templates/) of your theme folder. While page-templates/ is a commonly used convention, it's not required. Note: nested subdirectories like pages/templates/ are not supported.