Download Random Post Box from WordPress.org
See the plugin in use on Retrocamera.net (the little box below the first post).
Random Post Box is a WordPress plugin. It will let you place a box (div) anywhere on your blog, with templatetag or shortcode, and load random posts with an interval and fade effect. It uses jQuery (Ajax) which means that the content is loaded without loading the rest of the page. The timing can be controlled in the Admin Options-panel.
The template tag is <?php random_post_box(); ?>. You can also use the shortcode [random-post-box] in a page or post.
Features
- Insert placeholder with template tag
- Insert placeholder with shortcode
- Set time for displaying the post
- Set times for fade in and fade out affect
- Exclude or include posts by category
- Exclude posts by age (in days)
- Use title only
- Use post excerpt or bodycontent
- Strip tags from body
- Show/hide post metadata
- Prepared for translation
Installation
The installation is like mosts plugins:
- Download and extract the files
- Upload `random-post-box` folder to the `/wp-content/plugins/` directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Place `
<?php random_post_box(); ?>` in your templates, or[random-post-box]in a page or post.
The install doesn’t touch the database much, it just adds one option post.
Frequently Asked Questions
Is there an option to display several posts?
Not at the moment, but it might be included in future versions. It’s not recommended to use the
template tag several times on the same page.
How can I style the box?
The box is a div with id “random-post-box”, and the markup inside is quite similar to the
default theme.
The box changes size when loading a new post
You need to set the size to something static with CSS, or use some means to control the size. Use the id “random-post-box” as described
in the previous answer.



This is a great plugin! Terrific idea as it will keep old posts alive on the website. I am, however, having trouble finding where to set the timings, etc. I am a WP rookie, so, I may be in front of my eyes, but, thought you would be able to help out.
Thanks!!
Thanks Elizabeth :) After activation, you should find the settings in the WordPress admin Options-panel, in the bottom left. The page is called Random Post Box.
[...] Eklenti Ana Sayfası [...]
My friend is using your plugin. I’m currently using a different plugin on my site but noticed a lot of inconsistencies. So this will work perfectly.
Hi Mattias,
Really nice plugin, I’ve been looking for something like this for a while now and this is the best execution I’ve come across. I really like the rolling fade effect. (One strange thing, it wouldn’t work for me using the shortcode, I had to insert the template tag into the page using a php code plugin – no problem, its working great now). Thanks for all your efforts. Great job!
Great pugin. I was looking for something like this all day. It is very useful.
Thank you ~ Tom
Excellent plugin, but I do have one question:
Is there any way to modify/duplicate the plugin so that I can place two different versions of the post box? I have two categories that I want to display in different places, but I need to have each location only display the category associated with that location.
This plugin didn’t work for me. I have 3 posts in the category I told it to pull from, set the #days to 0 so it should have pulled them all. Nothing displayed (no code was generated at all).
Hey Mattias!
It’s such a great plugin! Thanks. But unfortunately it doesnt play well with wordpress 3 :( It doesnt load content … Just to let you know :)
All the best!
Thanks, I know :) Well fix as soon as I get some time. Think it’s due to jquery version has changed in wp3.
[...] The original post about the plugin &raqou; Share and Enjoy: [...]
I like the look of this plugin, but unfortunately it’s just not working for me. Where the post should output, I just get ‘-1′ fading in and out. Pity really, as it’s exactly what I need.
Have you ever thought of making this into a widget that can just be dropped into the sidebar? That would be really nice.
This means the ajax-script that should find a post is fading. Do you have any special settings?
Nice idea, think I’ll give it a try and make an update :)
Would be a huge help if you could look at the website above. I’m trying to configure boxes of all the articles I have posted and the one person who might know how is running for office in DC. Any help would be immensely appreciated.
Essentially I want all my pages and categories to resemble my homepage and I can’t figure out it your plugin will do that.
Again, any help would be great.
Your plugin thus far it seems is the only possible approach I can take.
- John
Plugin work like a charm. Thank you. Do you think about settings with different fade and slide effects? it’s will be really great!!!
This seems like a great plugin, but it doesn’t load on my site. Does it still not play nice with WP3.0?
Actually, I think that I may have figured out this problem, but don’t wish to go to deep into your code to fix it until I know whether or not your plugin works with WordPress 3.0 MU.
I have an MU site that is made up of 4 blog sites interfaced as one. The problem I think that I am running into is that I am running your plugin on the First page and trying to pull blog posts from Blog A, and there is no way of picking that RSS feed. Any ideas?
I would love to use your plugin as I love the Ajax feature, the fading in and out of posts and updating the content automatically. I would prefer this over just a random post selected and placed in the spot.
Thank you Mattias
Thnks for the plugin
Hello,
This is a great Plugin. Is there a way to set the time for displaying in each post ( dynamic) ? I want to show video’s in the post.
Hello Mattias,
thank you for this great and unique plugin! Do you know, if it’s compatible with Google’s instant preview? Preview of Retrocamera.net shows only black space.
the pluginname say random but is it possible to play the last posted post first and then play the older one’s?
Thank you for this plugin, i going to use this in my blog