get_post Wordpress function


Retrieves post data given a post ID or post object.



(int|object) $post Post ID or post object. Optional, default is the current post from the loop.
(string) $output Optional, default is Object. Either OBJECT, ARRAY_A, or ARRAY_N.
(string) $filter Optional, default is raw.

Return Type:

(WP_Post|null) WP_Post on success or null on failure

Define At:


Wordpress Reference URL:

0 Flares Facebook 0 Google+ 0 0 Flares ×
Posted in: Wordpress functions
0 Flares Facebook 0 Pin It Share 0 Google+ 0 0 Flares ×