[wp-trac] [WordPress Trac] #61210: Custom Template Not working
WordPress Trac
noreply at wordpress.org
Fri May 24 08:32:15 UTC 2024
#61210: Custom Template Not working
--------------------------+------------------------------
Reporter: nkpathan | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 6.5.3
Severity: normal | Resolution:
Keywords: dev-feedback | Focuses:
--------------------------+------------------------------
Changes (by poena):
* keywords: => dev-feedback
* component: Themes => Editor
Comment:
Hi
Thank you for the report and the additional information.
To summarize: PHP template files in hybrid themes do not show up as
selectable templates when you open a page in the page editor and select
the option "Swap template".
Looking back at Gutenberg issues and PR's, the implementation of this
"swap template" feature started a year ago, and it may be difficult to
recall if there was a conscious decision not to support PHP templates,
''but it is very likely that this was missed because this started out as a
Site Editor feature'', where only HTML templates can be used:
https://github.com/WordPress/gutenberg/issues/51347
This may be a side effect of the unification of the Site Editor and block
editor.
I am going to ping @youknowriad @Mamaduka who recently worked on a similar
issue with custom template swapping
(https://github.com/WordPress/gutenberg/issues/61031).
This problem is not an issue in WordPress 6.4 since the template selection
used a dropdown where the PHP template was listed, so it is a regression.
I would also suggest that this issue is closed and re-opened in the
Gutenberg GitHub repository since this is a problem related to the editor.
I can confirm that
- I am able to reproduce the problem.
- No templates are listed under the "page attributes" panel, and this is
correct. The page template selection has moved multiple times. The
location of the template selection is not visible in the "page backend"
screenshot that have been shared here, but this is not a bug, but a change
in the interface.
- The correct place for the PHP template files in a hybrid theme is the
root folder.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61210#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list