Title: Recent Posts
Last modified: August 18, 2016

---

# Recent Posts

 *  [clayh](https://wordpress.org/support/users/clayh/)
 * (@clayh)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/recent-posts/)
 * I used the hack from MtDewVirus to display Recent Posts, and it works well. However,
   if I save an entry as a draft, the Recent Posts script displays that entry, which,
   obviously, isn’t desirable. Any ideas?

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Nick Momrik](https://wordpress.org/support/users/mtdewvirus/)
 * (@mtdewvirus)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/recent-posts/#post-33399)
 * Whoops….that was an oversight on my part.
    I just updated the code. [http://wiki.wordpress.org/index.php/Recent%20Posts](http://wiki.wordpress.org/index.php/Recent%20Posts)
 *  [daisyhead](https://wordpress.org/support/users/daisyhead/)
 * (@daisyhead)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/recent-posts/#post-33632)
 * Any idea how to use this so it will display the recent posts that have scrolled
   off the main blog page?
    Thanks, Daisyhead
 *  [southerngal](https://wordpress.org/support/users/southerngal/)
 * (@southerngal)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/recent-posts/#post-33637)
 * How would I use the code to skip private (protected by password) posts?
 *  [daisyhead](https://wordpress.org/support/users/daisyhead/)
 * (@daisyhead)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/recent-posts/#post-33647)
 * Thank you so much for the help! I implemented it and it works like a dream! I
   am really loving WP!
 *  [Nick Momrik](https://wordpress.org/support/users/mtdewvirus/)
 * (@mtdewvirus)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/recent-posts/#post-33649)
 * SG,
    If you pass false for the 4th parameter, it will pull **published posts 
   that have a blank password**. Doesn’t matter if you are skipping posts or not,
   if the 4th parameter is false, password protected posts will not be pulled from
   the database. The only thing that has changed from the previous version of the
   hack is the added parameter, which allows for skipping.
 *  [southerngal](https://wordpress.org/support/users/southerngal/)
 * (@southerngal)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/recent-posts/#post-33655)
 * Thanks Nick, I will try that in the morning. 🙂
 *  [Nick Momrik](https://wordpress.org/support/users/mtdewvirus/)
 * (@mtdewvirus)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/recent-posts/#post-33658)
 * No problem…let me know how it works.
 *  [southerngal](https://wordpress.org/support/users/southerngal/)
 * (@southerngal)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/recent-posts/#post-33690)
 * Perfectly! 🙂
    Would that work on the most commented as well? I don’t have anything
   in the parameters at all.
 *  [Nick Momrik](https://wordpress.org/support/users/mtdewvirus/)
 * (@mtdewvirus)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/recent-posts/#post-33719)
 * Shoot…I’m going to have to update the function on the most commented so that 
   it only pulls published posts and has an option for password protected ones. 
   I’ll have it done at some point tonight.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Recent Posts’ is closed to new replies.

 * 9 replies
 * 4 participants
 * Last reply from: [Nick Momrik](https://wordpress.org/support/users/mtdewvirus/)
 * Last activity: [22 years, 4 months ago](https://wordpress.org/support/topic/recent-posts/#post-33719)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
