06 Research and Documentation WP_Post Object

Link back to Main Page

WP_Post object summary

WP_Post objects are not just the post on a website, but also specific objects that are located in the WordPress database for a given site.

WP_Post object data contained in the object

There is a vast amount of data stored in the object, including but not limited to: ID, author, date, content, title, excerpt, post type, etc.

WP_Post object role in the page load

The post object is vital to the page load, as it contains all the data necessary for the page from the database. If built properly, the post object will load in all the correct data based on the given query. For example, wordpress usually relies on ID to determine what page is being linked to. That information is located in the post object.

Summary

In Summary, we talked about the Post Object and it's connection to the database. We talked about some of the properties that are included in the post object, like ID, author, date, and more. We also talked about the post's role in the page load, and how it holds everything necessary to load in the right page.