-
WP_Post Object Summary
WP_Post is like a container that stores information about a post. The information about the post that WP_Post is stored, plays an important role as to how the post will be displayed, and what information will be displayed on a page about that post.
-
WP_Post Object Data Contained in the Object
WP_Post objects store variables. All these variables that are stored in it are information about the posts on the WordPress site. Some of these variables are: ID, post_author, post_title, post_date, and post_excerpt, to name a few. All these are parts of a post, and have a function as to how a post is displayed.
-
WP_Post object Role
The main role of WP_post object in each page load when it called by functions such as get_post, is to retrieve the information requested about the post. Once the function is called, the objects stored in the database are returned and displayed.
-
Summary
In summary, the WP_Post object is a key component to store and retrieve post objects in order to display them in a page. The data can be called by calling a function and requesting to display a variable fro that specific post. This then can be displayed with the echo command on a page.
-
Sources: