[wp-trac] [WordPress Trac] #61210: Custom Template Not working

WordPress Trac noreply at wordpress.org
Wed May 22 17:04:27 UTC 2024


#61210: Custom Template Not working
--------------------------+------------------------------
 Reporter:  nkpathan      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Themes        |     Version:  6.5.3
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by bvankat):

 +1 - Same experience here. And I've recreated this in the WordPress
 Playground.

 Started by uploading a modified version of the TT4 theme that included a
 php post template — in this case, template is called "Weekly Newsletter."
 Filename is "template-weekly-newsletter.php", and stored at the root level
 of the theme folder. (FWIW, same behavior if the php template is stored in
 the theme's "templates" directory.)

 In 6.4, the post editor shows a dropdown menu when switching templates.
 This dropdown menu shows the name of all available templates, including
 php and html templates. (The php template can also be selected in the
 posts list page via Quick Edit.)

 In 6.5.3, the template switcher has options for Edit Template, Swap
 Template, Create New Template and Template Preview. When selecting "Swap
 Template" a modal opens with the available choices. This modal does *not*
 include PHP templates, only html templates. As mentioned earlier in this
 thread, the only way to select the php template is via the Quick Edit
 option on the Posts list page.

 Additionally in 6.5.3: Once the *php* template is selected via Quick Edit,
 the post editor no longer shows the Template switcher in the post
 settings. At that point, the template can only be changed via Quick Edit
 until you select an html template again.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61210#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list