Yet Another Recent Posts Plugin

September 18, 2008  | 
21 Comments

Building on the venerable ah_recent_posts_mu plugin (Ron Rennick), I’ve put a version together that allows for a bit more flexible output and control. It’s a short plugin and not very complex, but it’s very flexible and extremely handy. The enhancements are as follows:

  • automatically exclude all posts from the main blog (ID = 1)
  • automatically exclude all “Hello World” posts on new blogs
  • three display options: 1. “title”: title only 2. “name”: blog name and title, and 3. “excerpt”: blog name, title and post excerpt. The excerpt defaults to 30 words but this can be changed by specifying an integer argument.
  • Gravatar support, post date, and post author (all optional and configurable)

Sample function call:

<?php ahp_recent_posts(5, 90, 30, ‘<li>’, ‘</li>’, 1); ?>

which would display the 5 most recent entries over the past 90 days, displaying titles, blog name, and 20-word excerpt.  The last argument is a bitmask, in this case showing just the gravatar, hiding the post date and author. A screenshot of the output for this function call is shown at right.

You can see also see the plugin in action at Talk Islam, under the sidebar section titled “Recent Journals”.

The latest version (0.5) of this plugin is at WPMUDEV with a more complete description and also the full argument list. Latest source code is also at pastebin here.

Featured Plugin - Every great SEO tweak you need, in one snazzy bundle

Fully integrated with the SEOMoz API, complete with automatic links, sitemaps and SEO optimization of your WordPress setup - this is the only plugin you need to help you rank your site number 1 on Google - nothing else compares.
Find out more

Featured Plugin - Send beautiful html email newsletters, from WordPress!

Now there's no need to pay for a third party service to sign up, manage and send beautiful email newsletters to your subscriber base - this plugin has got the lot.
Find out more

Featured Plugin - Easily integrate your WordPress site with Facebook

Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Find out more

Featured Plugin - Start Your Own Powerful Membership Site

If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
Find out more

Featured Plugin - WordPress + Google Maps = Perfect

Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more

Featured Plugin - Turn any WordPress page into a fully featured wiki!

To get a wiki up and running you used to need to install Mediawiki and toil away for days configuring it... not any more! This plugin gives you *all* the functionality you want from a wiki, in WordPress!!!
Find out more

Featured Plugin - Start your own Quora / StackOverflow / Yahoo Q&A site

It's now incredibly easy to start your own Q&A site using nothing more than WordPress - The Q&A plugin simply and brilliantly transforms any site, or page, into a perfect support or Q&A environment.
Find out more

Featured Plugin - Host sites, get paid, just like WordPress.com

If you've ever wondered how you could offer a paid site management and hosting service, then this is the plugin for you. Offer a freemium or paid service, for any niche you like, it's powered Edublogs.org to success already!
Find out more

Featured Plugin - Open an Online Store with MarketPress

Out of all the WordPress ecommerce plugins available, this has got to be the winner - easy to configure, powerful functionality, multiple gateways and more. A simply brilliant plugin!
Find out more

21 Responses to Yet Another Recent Posts Plugin

  1. Unreal, very nice and I’m sure it’ll be popular :)

  2. Hi James, thanks. I actually just upgraded the plugin, adding gravatar support and also some better formatting (including capitalizing the first 5 words of thex excerpt). Should i do a new post for the updated version? or just amend this one?

  3. Pingback: AHP Recent Posts plugin for Wordpress MU at meta BLOG

  4. OK, the new version is now posted at WPMUDEV: http://wpmudev.org/project/AHP-Recent-Posts-for-WPMU

  5. how do i hack this plugin to show more than one post per blog? let´s say the last 10 posts…

    thanks,

    Morgan

  6. hmm. will look into it;…

  7. Pingback: links for 2008-09-21 | Deuts’ Notepad

  8. Hi azizhp!

    did you had time to have a look into it?

    thanks,

    morgan

  9. note, the plugin has been updated. Theres a new project page at wpmudev, here:

    http://wpmudev.org/project/AHP-Sitewide-Recent-Posts-for-WPMU

  10. morgan, i made a lot of changes to the plugin, but adding posts from all blogs is actually a pretty hard problem to solve. it will require a pretty drastic overhaul of te underlying queries. Havent really figured out an elegant way to do that without doing a fundamental rewrite. Its on my todo list, though.

  11. i upload the plugin and i tried to install it but its gives me an error?

  12. can you be more specific about the error?

  13. NICE WORK AZIZ! great effort.. thank’s a lot :D

    btw.. how to disable this? “1st five words of excerpt are capitalized for readability”?

    is it possible to exclude particular category/tag?

  14. @Aziz Poonawalla,
    would it be possible just getting the MU Blognames and Avatars on the Frontpage?
    any suggestions would be a great help.
    thanks

  15. indojepang/khan,

    i am about to release a new version which will give you the functionality/customability you need, stay tuned

  16. Pingback: WPMU.org - WordPress MU plugins, themes and news » » And the WordPress MU plugin contest winners are…

  17. Hi I am getting an error too:
    Parse error: syntax error, unexpected ‘>’ in /home/sites/oxford-novelists.org.uk/public_html/wp-content/themes/brown/recentposts.php on line 9

    What am I doing wrong. I am not a coder or techie just a regular joe so please make it simple!!

  18. Pingback: A Magic Blog » Blog Archive » 2008 WPMU plugin competition

  19. I hope this isn’t a dumb question but when you click on gravatar it goes to domain.com/author/TEST but there is nothing there. How do I configure the author page. Also is there anyway I can use a bigger thumbnail picture?

  20. This plugin seems so much better than the ones I have used in my blogs. Gotta try this one day and see if it fits to my needs. It’s always nice to have control over things that you haven’t had :)

  21. Do you guys have a recommendation section, i’d like to suggest some stuff

Click on a tab to select how you'd like to leave your comment

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting