Archive | /wp-includes/post.php RSS feed for this section

get_post_custom

Retrieve post meta fields, based on post ID.The post meta fields are retrieved from the cache, so the function is optimized to be called more than once. It also applies to the functions, that use this function.

1585

Continue reading

get_posts

Retrieve list of latest posts or posts matching criteria.The defaults are as follows: ‘numberposts’ – Default is 5. Total number of posts to retrieve. ‘offset’ – Default is 0. See WP_Query::query() for more. ‘category’ – What category to pull the posts from. ‘orderby’ – Default is ‘post_date’. How to order the posts. ‘order’ – Default is ‘DESC’. The order to retrieve the posts. ‘include’ – See WP_Query::query() for more. ‘exclude’ – See WP_Query::query() for more. ‘meta_key’ – See WP_Query::query() for more. ‘meta_value’ – See WP_Query::query() for more. ‘post_type’ – Default is ‘post’. Can be ‘page’, or ‘attachment’ to name a few. ‘post_parent’ – The parent of the post or post type. ‘post_status’ – Default is ‘publish’. Post status to retrieve.

1572

Continue reading

get_post

Retrieves post data given a post ID or post object.See sanitize_post() for optional $filter values. Also, the parameter $post, must be given as a variable, since it is passed by reference.

1568

Continue reading