6R - WP_Post Object

WP_Post Object Summary

WP_Post is a class that stores information about a post inside of objects. These objects are stored by the database and are returned by functions like get_post().

WP_Post Object Data

WP_Post contains a large collection of properties, one for each type of data that is related to a certain post. A few examples include the post's title, author, date, content and excerpt.

WP_Post Object Role on Page Load

Calling get_post() on page load will return the WP_Post class, which can be assigned to a variable. This variable will be an object, with access to properties that are defined by the class.

Summary

WP_Post contains every piece of data that we would care about for posts. Creating objects that are based on the WP_Post class, and then accessing its specific properties, is how we can begin to display these posts to our liking.