This widget will list random posts from a chosen category. You can choose how many posts to display, and whether to show the excerpt or the full content in addition to the post title. You may also link the widget title to the category archive if you like.
download at wordpress.org get support at wordpress.org donate to future development

This is an awesome plugin. I’ve been adding my own php code to the sidebar file to make this happen, but that limits the flexibility of where it can display, unless you get into hacking in extra widget areas (blah), and takes a bunch of extra time.
Your plugin does exactly what I was hoping for, and does it perfectly. 5 stars.
(by the way, I don’t know if you’ve seen Chris Pearson’s post about this at Pearsonified, but that’s where I got the idea and the code from… I bet his community—the Thesis crowd—would love to know about this plugin.)
Thank you so much! I’m glad it was useful.
I have not seen Chris’s post, but I’m considering using Thesis for a project myself, so that community might well include me by this time next week.
Would be great if the category were dynamical, I mean if I’m in a post show me the category it belongs… if I’m in a search show me the cat. of the first post, etc…
Regards.
I would also love to be able to use this with pages!
I’m looking for a Random Post by Tag plugin that enables me to specify the number of random posts and the tag they should match. I’ll be manually inserting it in my theme, so I don’t want a widget. If you know of anything like that or can write it, please let me know.
What is manuel adding code ? My theme isnot widget ready, please help..
how can i use it without widget ?
Excellent plugin, just what I needed! Wondering if you could shed some light as to where/how the excerpt length can be controlled within this widget? Is it using the default wordpress excerpt length? Dug around in the PHP a bit but couldn’t work it out.
Thanks in advance for any help, and thanks for the plugin all together!
It does use the default excerpt length, unless you have the_excerpt Reloaded installed. Then you’ll get a couple of extra option fields, including the length.
WP 2.9 includes support for customizing excerpt length as well as the [...] at the end.
For some reason it only seems to be picking up the most recent post in the category…
I also have your recent post plugin active…could they be conflicting?
A nice widget. Thanks a lot.
I need to put this wodget manually in my html-code. Can you give me a php-code which launch this pluging. Instead a sidebar option in WP. Please!
Nice plugin
but is there any way to also make the category random, I mean I just want a bunch of random posts from various categories ?
Lynne, I’m pretty sure I’m using the two on the same blog without conflicts. I’ll double-check, though.
Lionel, it’s in the works, but not yet.
Ys, no, there are other plugins that display random posts from any category. This one is more specific.
Stephanie,
I am having the same problem as Lynne Robson. It is definitely only showing the most recent post pulled from a category. How can I fix that so that it is truly random?
Thank you so much for your plug-in.
Todd
Plug-in is awesome but I am trying to figure out how to change the excerpt so that it does not display so many characters. Is there a viariable I can change? Is that an option you might soon incorporate?
Good job.
Stu
Stu, if you’re using the_excerpt Reloaded, you’ll have an option right in the widget itself to limit the number of words. Otherwise, you can put a few lines of code in your functions.php file. However, with that method, you’ll be changing the lengths of all your excerpts across your site, not just the one shown in the widget.
the site is at http://sodeepdemo.ofyourwebsite.com and I do not understand what you mean by “the_excerpt Reloaded”. I see the code in the Widget Editor but I am not a programmer. So, I don’t know what to do. As I am using your plug-in, I do not have an option to limit the number of characters. And I don’t want to make a global change to the website.
Sorry if I am being a pain.
Stu
202-462-4290
It’s a separate plugin you can install. My widget supports it, and you’ll get a couple of extra option fields if the other plugin is activated, including the length.
Wow. That was simple and it works. Thank you so much for your help! :)
Stu
Hello,
Thank you very much for this plugin it’s perfect !
I have a question :
I use custom fields in every posts. How can i put custom fields in this plugin ?
The exemple below doesn’t work…
Ex:
ID, “apercu”, $single = true); ?>
Thank you very much Steph !!
David
Is it possible to modify the code to include -custom field value of the random post must also equal the value of the post.
If I could be so bold – If so what would be the code?
Stephanie, many thanks for the great plugin, although I am having the same issue as Lynne Robson except it is only first post published in the category which is being picked up and used.
I don’t suppose you have any ideas what could be causing this to happen?
Thanks in advance,
Craig
Hi . . . This is a great plugin!
I was wanting to know if something is possible? I am using the plugin in the fotter of my pages and haved edited it to include the gd star rating and the image for the random post.
Problem: I decided that instead of using
to get the image placed into the content of the post, I have coded my theme to show all images in the gallery using . . .
Since changing to using the gallery code, I cannot get an image to show in your plugin.
Goal: Would you have any suggestions as to what code to use to accomplish showing the first or last image, and what could be the only image in the gallery attached to that random post, in your plugin? I know just enough php to be dangerous. lol
apologies but the code tag did not seem to work.
was using:
?php get_the_post_thumbnail( $id, $size, $attr ); ?
trying to use but not working:
?php echo do_shortcode(“[gallery]“); ?
Hello Steph,
I use “Simple Post Thumbnails” and i want to include the thumbs for each post from “Random Posts from Category”
I tried this code but it doesn’t works :
img alt=”?php the_title(); ?” src=”?php echo p75GetThumbnail($post->ID, null, null); ?” border=”0″ /
Thank you for your help.
David
hi, thanks for this plugin.
when i use this plugin for one of my categories with 1300 posts it’s not work.but when use for other categories whit less post it’s work wery well. what can i do for this problem?
thanks for your help.
how to display manual this plugins, what code to use, for example i want display on the search page
thanks
Is there an easy way to get this plugin to show custom post types instead of regular posts?
I answered my own question – it was very easy! I modified the query to include post_type=any
Is it possible to modify the code to include -custom field value of the random post must also equal the value of the post.
If I could be so bold – If so what would be the code?