get_posts


get_posts ( $args = null )

Parameters:
  • (array) $args { Optional. Arguments to retrieve posts. See WP_Query::parse_query() for all available arguments.
See:
  • WP_Query::parse_query()
Returns:
  • (WP_Post[]|int[]) Array of post objects or post IDs.
Defined at:

Description

Retrieves an array of the latest posts, or posts matching the given criteria.

The defaults are as follows:

Related Functions

get_post, next_posts, get_post_types, edit_post, get_post_stati

Top Google Results

User discussions

wpseek mobile