Make WordPress Core

Opened 6 years ago

Last modified 9 months ago

#46490 accepted defect (bug)

Clarify documentation that page-templates folder is not necessary for theme templates

Reported by: skorasaurus's profile skorasaurus Owned by: williampatton's profile williampatton
Milestone: Awaiting Review 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 (3)

#1 @iamdmitrymayorov
6 years ago

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.

#2 @williampatton
5 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 @poena
9 months ago

  • Keywords close added

@williampatton Could you move this to the Documentation issue tracker?
https://github.com/WordPress/Documentation-Issue-Tracker

Note: See TracTickets for help on using tickets.