get_post Wordpress function


Description:

Retrieves post data given a post ID or post object.


Syntax:


Arguments:

(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:

wp-includes/post.php


Wordpress Reference URL:

http://codex.wordpress.org/Function_Reference/get_post


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