WordPress comes with a Recent Posts widget that you can use to display a list of your latest posts in your widgetized sidebar, but it’s really not very good in the fact that it does give you any control over your posts at all. So I’ve written a new one.

[box style=”notice”]An enhanced version of this plugin is available from Code Canyon.net[/box]

This is a very simple plugin, but it gives you much better control over your widget display.

Plugin features include:

  • New Recent Posts Widget
  • Widget Title Option
  • Option to control the number of posts displayed
  • Option to control the posts offset
  • Ability to enable post thumbnails
  • Thumbnail size option
  • Choose the post type to display

If you’d like me to write a tutorial on how to make a widget like this, let me know in the comments!

Change Log

v1.1 - added ability to choose which post type to display

v1.1.1 - fixed a bug with post type detection

v1.1.2 - added category selection

v1.1.3 - fixed bug with select field options vanishing

v1.1.4 - fixed offset bug and post type bug in posts query
Download
  1. Jeroen

    So simple.. But so cool! Nice one!

    • pippin

      Thanks! I hope you find it useful

  2. AJ Clarke

    Nice and simple widget…good idea 🙂

  3. Gareth Murran

    Nice plugin thanks. A useful addition would a class field for some custom css.

    • pippin

      Would you like to see that within the widget settings?

  4. Piet

    Great idea and your plugin looks nice!
    A question: In the settings I see you can set the thumbnail size. Will that also work for existing images or only for images that are newly uploaded?

    • pippin

      It will work for all images.

    • Piet

      Great! And thx for your fast reply

    • pippin

      Let me know if you have any suggestions or problems!

  5. Cuinn

    Can you make it select category?

    • pippin

      I will see if I can update it sometime soon for that.

  6. Mark

    Hi Pippin

    Nice and simple plugin! Thanks.

    Do you think it’s possible to choose a custom post type in the post selection drop down?

    That would be pretty awesome if so. For example, I have a site that displays apartments and flats, it would be really good to include the widget on a property page and show ‘the last 5 properties added’ or something. How ever the property page is a custom post type.

    Hope that makes sense.

    Thanks Mark

    • pippin

      It already has that function 🙂

    • pippin

      What is your post type called?

  7. Mark

    property_guide and there’s 2 more that I created with ECT

    • pippin

      Ah, interesting. You have found a bug in one of the plugins for sure. I just tested it and post types created in ECPT do not show up in the drop down. I will see what I can do about it.

  8. Mark

    Great stuff. Thanks Pippin. Have a good weekend.

  9. pippin

    @Mark, I have fixed the problem. It was a small bug in this plugin. I’ve uploaded a new version with the bug fix. You can download it here.

  10. Mark

    Awesome! Thanks for the swift response Pippin.

  11. jimmy

    Do you have any screenshots of how this will look on a blog? I can’t find any…

    • pippin

      It will look exactly like any other widget on your site. It has been built to integrate perfectly.

  12. Dusty Bacon

    I would also love to see category selection added.
    This is a GREAT plugin, thank you!

    • pippin

      @Dusty – I will see if I can go ahead and add category selection when I return from my trip.

  13. Laurence

    Hi Pippin, great plug-in but for some reason it does not show any thumbnails in the list and the choose post type box seems to have frozen?

    • pippin

      @Laurence – the thumbnails require that the posts have a featured thumbnail set, it does not automatically detect images placed in the post.

      I have noticed the freezing as well (or rather a blank select menu) but have not found a solution. I will post an update when I find it.

  14. Phil Julian

    Not sure what’s changed recently but the “skip posts” option now doesn’t appear to do anything… was working fine up until today (4th July 2011)

    Any suggestions?

  15. Phil Julian

    …sorry, some more info:

    WordPress 3.1.4
    Better Recent Posts Widget 1.1.3

    • pippin

      @Phil and @denise_kc – The offset issue has just been fixed. You can download the new version from the download button on this page.

  16. denise_kc

    I LOVE your plugin – and REALLY LOVE that you live in Lawrence (I’m in KCMO!) I am prob making a noob mistake, but the offset is not working … no matter what # I type in, the most recent post is appearing. any info you can pass on is much appreciated – thanks again!

  17. Odirlon Herartt

    tem como colocar como shortcode?
    colocar para exibir em determinado ligado do layout
    sem usar widgets???

    Obrigado!

    • pippin

      Widget coming soon 🙂

  18. Matt

    Hey there,
    I just purchased Better Recent Posts and would like to be able to keep the css look of the original WP recent Posts look. For example I would like the title of the post to be a heading (H3) or something.
    here’s the site (http://jollytours.ca/category/contact-us/)… I would like the sidebar using “Better Recent….” to look like the footer using WP recent comments.
    Is this possible. Any help at all would be greatly appreciated.
    Thanks

    • pippin

      @Matt – are you comfortable getting into the code? I can show you where you need to make changes.

  19. niki

    Hey friend,

    I loved the plugin. Thank you for developing it. Keep up the good job.

  20. Jeff

    Great plugin! Has anyone noticed that if I set a category ID, the plugin ignores how many posts I set it to display? Eg if i set category to 6 and posts to display to 4 it displays the correct category, but shows every post I have in that category. Bug? or am i doing something wrong?

    Jeff

    • pippin

      @Jeff – are you using the free or premium version?

  21. Jeff

    oh I didnt know there was a difference? LoL let me look around for it.

  22. Dennis

    Is there a way to get rid of the “# days ago” below each post title? I didn’t see an option anywhere and I couldn’t pick it out of the code.

    • Pippin

      @Dennis – The $4 pro version has an option for this. If you want to stick with the free one, though, you will have to remove it from the code.

  23. Dennis

    I figured it out. I just removed the “time” span. Thanks for the great plugin.

  24. Jenni

    As per someone elses comment earlier, when you define a category the number of posts to show no longer works. (i.e. if I dont define a category and define it to show 1 post it shows only the latest post in all categories. When defining a category it shows all posts no matter how many I set it too). Is this a bug?

    • Pippin

      @Jenni – Hmm, I’m not able to replicate this. I’m uploading a new version right now that may fix the problem. Please redownload it (from here, not the plugin repository) and let me know if it’s fixed.

  25. Jenni

    Thanks for the prompt reply. I have just installed this (downloaded from this page v1.5) and the moment I add a category ID it ignores the number of posts still. (It shows 6 posts rather than the 1 specified).

    • Pippin

      @Jenni- Strange. What version of WP are you running?

  26. Jenni

    Im using WP 3.2.1. I notice Jeff on 4th August said he was getting the same error (comment 38)?

    • Pippin

      @Jenni – Yes, and the reason was never determined. Let me look through the code again and see if I can find why this is happening.

    • Pippin

      @Jenni – Okay, I’ve made another change. Try downloading again.

  27. Jenni

    Thank you for being so helpful 🙂 Its still not working though Im afraid! I am resetting the sidebar as well (deleting the widget and re-adding) to make sure its not remembering anything.

    • Pippin

      @Jenni – I wish I knew what was going on here. Would you be willing to share login info with me (via my email)? If so, I can login and take a closer look.

Comments are closed.