Random One Cat Widget

This Widget shows up to five random posts from a given category.

More Information

Random One Cat Widget 2.3 Released

This release adds an enhancement request to allow the shortening of posts to the More… marker if it is used (if it isn’t used for a post the entire post content is displayed as before).  This gives much more flexibility about the type of post that you are able to display in the widget.  To use this simply check the new option box on the widget.  If you aren’t displaying post content, but only title, there will be no change to the display.

 

Random One Cat Widget 2.2 Released

I’ve had a couple of comments about the formatting of titles from people using the widget to display a list of titles for random posts.  After thinking about this for ages it finally dawned on me that WP widgets tend to use an unordered list for display and I didn’t use that in this widget because originally the widget only displayed one post and mostly then just the text of that post and not the title.  However since I updated the widget to display up to five posts and added the option to only display the post titles, that configuration is popular, but the formatting isn’t a list.

OK that was a long boring explanation of why the list of titles isn’t actually a list.  Well it doesn’t matter so much why it happened that way only that it did and more importantly that people expect it to be a list.  So now it is.

In this version if you choose to display titles only you’ll get an unordered list.  If you don’t you’ll get the same display as before (a div for each post).  I hope that helps.

Random One Cat Widget 2.0 Released

Version 2.0 of the Random One Cat widget for WordPress was released today.  This is a complete rewrite of the module to use the new WP widget class.  That not only future proofs the widget but also greatly simplifies the code and reduces it by about half.

In addition this version allows you to display up to five random posts at a time, rather than just a single post.

Unfortunately the move to the new WP widget class means that any widgets you have already added to you theme with a previous version will be removed when you upgrade to version 2.0.  I know that will be annoying but the benefits of moving to the new class far outweigh the effort to re-add the widget (i.e. this widget will continue to work in WordPress 3.1 and beyond).