[wp-trac] [WordPress Trac] #28243: If a static page is used as the "Posts page", the page's metadata is not availible

WordPress Trac noreply at wordpress.org
Wed May 14 17:05:52 UTC 2014


#28243: If a static page is used as the "Posts page", the page's metadata is not
availible
--------------------------+-------------------------
 Reporter:  Kelderic      |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Query         |     Version:  3.0
 Severity:  normal        |  Resolution:  worksforme
 Keywords:                |     Focuses:  template
--------------------------+-------------------------
Changes (by helen):

 * keywords:  close =>
 * status:  new => closed
 * resolution:   => worksforme
 * milestone:  Awaiting Review =>


Comment:

 `get_the_ID()` is indeed a function to be used within The Loop, and since
 the loop on that page is that of the latest posts, it is returning what
 it's supposed to.

 Codex can be edited by anybody who is logged in. I think it would be
 sensible to make a note about getting the ID that you want, but perhaps
 not too specific, and remembering that `get_post_meta()` is not where you
 learn about how to get the ID of the object you want.

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


More information about the wp-trac mailing list