Codex

Function Reference/wp get recent posts

Contents

Description

Retrieve the $num most recent posts from the database in order of the post date. Defaults to retrieving the 10 most recent posts.

Usage

<?php wp_get_recent_posts$num ?>

Parameters

$num
(integer) (optional) Number of posts to get.
Default: 10

Return Values

(array) 
List of posts.

Examples

Notes

Change Log

Since: 1.0.0

Source File

wp_get_recent_posts() is located in wp-includes/post.php.

Related

See also index of Function Reference and index of Template Tags.