Opened 4 years ago
Last modified 4 years ago
#46490 accepted defect (bug)
Clarify documentation that page-templates folder is not necessary for theme templates
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | minor | Version: | |
Component: | Themes | Keywords: | |
Focuses: | docs | Cc: |
Description
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/).
Might also be helpful to mention that if, for example, the template was in the root directory of the theme and some pages were using it, when you move it to a subdir, those pages will fall back to the default page template.