Skip to content

Instantly share code, notes, and snippets.

@vanaf1979
Last active October 8, 2019 08:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanaf1979/f499c037871ab927a874111e0298eddf to your computer and use it in GitHub Desktop.
Save vanaf1979/f499c037871ab927a874111e0298eddf to your computer and use it in GitHub Desktop.
Gist for my article WordPress: Access post meta fields through WP_Post. https://vanaf1979.nl/wordpress-access-post-meta-fields-through-wp-post/
WP_Post Object
(
[ID] => 2
[post_author] => 1
[post_date] => 2019-10-05 10:14:30
[post_date_gmt] => 2019-10-05 10:14:30
[post_content] => Some Content
[post_title] => Sample Page
[post_excerpt] =>
[post_status] => publish
[comment_status] => closed
[ping_status] => open
[post_password] =>
[post_name] => sample-page
[to_ping] =>
[pinged] =>
[post_modified] => 2019-10-05 10:14:30
[post_modified_gmt] => 2019-10-05 10:14:30
[post_content_filtered] =>
[post_parent] => 0
[guid] => http://example.com/?page_id=2
[menu_order] => 0
[post_type] => page
[post_mime_type] =>
[comment_count] => 0
[filter] => raw
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment