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?
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?
Whoops....that was an oversight on my part.
I just updated the code.
http://wiki.wordpress.org/index.php/Recent%20Posts
Any idea how to use this so it will display the recent posts that have scrolled off the main blog page?
Thanks,
Daisyhead
How would I use the code to skip private (protected by password) posts?
Thank you so much for the help! I implemented it and it works like a dream! I am really loving WP!
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.
Thanks Nick, I will try that in the morning. :)
No problem...let me know how it works.
Perfectly! :)
Would that work on the most commented as well? I don't have anything in the parameters at all.
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.
This topic has been closed to new replies.