[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
Tue May 13 18:56:16 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: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 3.0
Severity: normal | Keywords:
Focuses: template |
--------------------------+-----------------------------
=== To Reproduce: ===
1. Set up a WordPress install.
2. Create a static page.
3. In ''Settings -> Reading'', Set "Posts page:" to your created static
page.
4. Give your static page any custom metadata.
5. Attempt to access this metadata via `index.php` using `get_post_meta(
$post->ID, ... )`
=== Expected Results: ===
Selected metadata should appear.
=== Actual Results: ===
No metadata appears.
=== Possible Cause ===
I think this is because the `$post` is being replaced by all the posts
which are being displayed. We should be able to grab the actual page's
metadata though.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28243>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list