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:

Description

Retrieves a number of recent posts.

Related Functions

wp_get_comment_status, wp_count_posts, wp_dashboard_recent_posts, get_adjacent_post, wp_get_single_post

Top Google Results

User discussions

wpseek mobile