[wp-trac] [WordPress Trac] #56394: Add docs to clarify that `get_page_template()` doesn't work on block themes

WordPress Trac noreply at wordpress.org
Tue Aug 16 22:00:23 UTC 2022


#56394: Add docs to clarify that `get_page_template()` doesn't work on block themes
-------------------------------------------+---------------------
 Reporter:  audrasjb                       |       Owner:  (none)
     Type:  defect (bug)                   |      Status:  new
 Priority:  normal                         |   Milestone:  6.1
Component:  Editor                         |     Version:  5.9
 Severity:  normal                         |  Resolution:
 Keywords:  needs-patch reporter-feedback  |     Focuses:  docs
-------------------------------------------+---------------------
Changes (by costdev):

 * keywords:  needs-patch => needs-patch reporter-feedback


Comment:

 Is this the intended behaviour?

 [https://developer.wordpress.org/reference/functions/get_page_template/
 get_page_template()] returns from
 [https://developer.wordpress.org/reference/functions/get_query_template/
 get_query_template()], which calls
 [https://developer.wordpress.org/reference/functions/locate_block_template/
 locate_block_template()]. That suggests to me there ''should'' be a path
 in which a block template can be retrieved.

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


More information about the wp-trac mailing list