Since WordPress 6.5 was released it seems that the assignment of templates created by code with "Template Name:" is no longer available. Is there a way to resolve the issue?
I’ll explain.
On the FTP, inside the child theme of Twenty Twenty-Two, I create a file called template-about.php
The code inside the file is as follows
In the backoffice, in the Pages section (with Gutengerg), up to version 6.4.4 of WordPress, the section with all the templates created by code was shown.
From version 6.5+, when I create a new page the templates section shows the following options, and if I click on "Select Template" only the two basic templates of the Twenty Twenty-Two theme are shown.
Additionally, all previously created pages that were assigned a template, in version 6.4.4, no longer show the template select.
2
Answers
For quick solution can change template with quick edit in list of pages;
Alternatively you should create a json file of your theme folder and manage your templates from there
source: here
Update:
reading the documentation in detail I believe it is sufficient to bring your customized templates from your current theme to a more updated theme that supports the block editor of version 6.5 of WordPress, and resume normal operation, also showing the "template" item during the editing a page.
For example with theme twenty-four it work fine.
best regards,
I also faced the same issue but, I could able to fix the issue by disabling Gutenberg editor we can able to see custom template lists as before!!
Also, after this changes I can use PHP files to create the child theme templates.
Lists of custom templates
Disabling Editor
best regards,