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 $output parameter. Empty array on failure.
Defined at:

Description

Retrieve a number of recent posts.

Related Functions

wp_get_comment_status, wp_dashboard_recent_posts, wp_count_posts, get_adjacent_post, wp_get_single_post

Top Google Results

User discussions

wpseek mobile