Title: Why would wp_get_recent_posts() return nothing?
Last modified: August 19, 2016

---

# Why would wp_get_recent_posts() return nothing?

 *  [df5000](https://wordpress.org/support/users/digitalformula/)
 * (@digitalformula)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/why-would-wp_get_recent_posts-return-nothing/)
 * Hi all,
 * I’m making a basic theme at the moment and I’ve added the following to sidebar.
   php (it’s an include of my own creation, not one used by WordPress as such).
 * <p>
    <h1><?php _e(‘Recent Posts’); ?></h1> <?php wp_get_recent_posts(); ?> </
   p>
 * However, that returns nothing but the title (and yes, there are posts on the 
   site!).
 * Any ideas? Am I using the tag correctly?
 * Thanks!

Viewing 1 replies (of 1 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/why-would-wp_get_recent_posts-return-nothing/#post-970614)
 * What not use the [template tag](http://codex.wordpress.org/Template_Tags), [wp_get_archives()](http://codex.wordpress.org/Template_Tags/wp_get_archives),
   with the **type=postbypost** parameter?

Viewing 1 replies (of 1 total)

The topic ‘Why would wp_get_recent_posts() return nothing?’ is closed to new replies.

## Tags

 * [wp_get_recent_posts](https://wordpress.org/support/topic-tag/wp_get_recent_posts/)

 * 1 reply
 * 2 participants
 * Last reply from: [MichaelH](https://wordpress.org/support/users/michaelh/)
 * Last activity: [17 years, 4 months ago](https://wordpress.org/support/topic/why-would-wp_get_recent_posts-return-nothing/#post-970614)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
