Opened 7 years ago
Closed 11 months ago
#46490 closed defect (bug) (invalid)
Clarify documentation that page-templates folder is not necessary for theme templates
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | minor | Version: | |
| Component: | Themes | Keywords: | close |
| 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/).
Change History (4)
#2
@
6 years ago
- Owner set to williampatton
- Status changed from new to accepted
Thank you for pointing this out. I'll grab the ticket and look at getting some updated text into those docs pages. This may be better off as a meta trac ticket but let's look at getting this sorted anyways :)
#3
@
22 months ago
- Keywords close added
@williampatton Could you move this to the Documentation issue tracker?
https://github.com/WordPress/Documentation-Issue-Tracker
#4
@
11 months ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from accepted to closed
Hi
Please continue the discussion here: https://github.com/WordPress/Documentation-Issue-Tracker/issues/1850
I will close this ticket since it is not a bug report or enhancement request for WordPress itself.
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.