wp_get_recent_posts
wp_get_recent_posts ( $args = array(), $output = ARRAY_A )
Parameters:- (array) args Optional. Arguments to retrieve posts. Default empty array.
- (string) output Optional. The required return type. One of OBJECT or ARRAY_A, which correspond to a WP_Post object or an associative array, respectively. Default ARRAY_A.
See:Returns:- (array|false) Array of recent posts, where the type of each element is determined by the `$output` parameter. Empty array on failure.
Defined at: - Introduced in WordPress: 1.0.0
- Deprecated in WordPress: —
Description
Retrieves a number of recent posts.