[wp-trac] [WordPress Trac] #49708: Add a new function get_page_by_guid

WordPress Trac noreply at wordpress.org
Wed Nov 19 08:35:46 UTC 2025


#49708: Add a new function get_page_by_guid
-------------------------------+------------------------------
 Reporter:  killua99           |       Owner:  (none)
     Type:  feature request    |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by philipzimmerm56):

 We have two different functions to get a post base from another field
 rather than ID get_page_by_path and get_page_by_title. When working with
 RESTful API working with unique identifier could be more handy than auto
 incremental or a path that could change.

 I propose to build a function named get_page_by_guid and help developers
 to search a Post more accurate with guid.

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


More information about the wp-trac mailing list