6R WP_Post Object

WP Post Object

When using a function such as get_post() the information requested is stored in a wp_post object. Everything that WorPress knows about a post can be stored in a wp_post object.

WP_Post object data contained in the object

WP_Post Objects contain the following data:

  1. ID: Stores the post's ID
  2. post_author
  3. post_type
  4. post_title
  5. post_date
  6. post_date_gmt
  7. post_content
  8. post_content_filtered
  9. post_excerpt
  10. post_status
  11. comment_status
  12. to_ping
  13. pinged
  14. ping_status
  15. post_password
  16. post_mime_type
  17. post_type
  18. post_name
  19. post_parent
  20. post_modified
  21. post_modified_gmt
  22. comment_count
  23. menu_order

WP_Post object role in the page load

The WP_post object is used to store data about posts. This data can then be accessed by methods such as get_post to retrieve that data for use on pages.

Summary

In summary like you say just about every week WordPress knows everything. This is just another example of that. Everything there is to know about posts on your site can be found by accessing the WP_Post object.