Get Random Page - Wordpress Plugin
As you know in addition to regular posts in Wordpress, you can also write pages and organize them with your own hierarchy.
You can pages for anything and display it as a regular page like a post or combine it within your template by outputting its content as HTML. Get Random Page does the latter.
This plugin selects a random page from your static pages and outputs its content anywhere in your template.
I use this plugin to rotate ads (see on the top right hand corner), but you can use it for anything you want. For instance you can display a random quote, a random ad, a random tip or anything else you have.
Since pages can be grouped Get Random Page plugin supports groups by specifying 鈥渃hild of鈥?, so you can select a random page from a specific group of pages.
Installation:
Download (.zip) extract and copy the plugin to Wordpress plugin folder and activate it.
After you activate the plugin just use the function get_random_page($child_of) anywhere in your template you want to output a random page.
$child_of is the page ID (number) from which you want to select the random page
If $child_of is not set then it’ll pick a random page from all your pages
For instance: < ?php get_random_page(501) ?> will select and output a random page from all the pages that are children of page id 501











(2 votes)
RSS Feeds 



July 11th, 2006 at 11:35 am
This plugin is just what I’m looking for, but I have a question: Is there any way for the plugin to output more than just the text in the page content? It seems to strip out everything but the text in the content of the page, so for instance the page title, paragraph breaks, etc. are removed.
I’m trying to use it to display a random page on a site’s homepage, but I want the random page to look just like a regular page, with a regular heading and paragraph breaks.
April 25th, 2007 at 8:00 am
I have the same problem… no answer since 2006, so I write a comment with a desesperate feeling.
April 25th, 2007 at 12:46 pm
This plugin is not intended to do that, and unfortunately I do not have time to make any changes to it.
October 2nd, 2008 at 10:00 am
I have this site bookmarked. Thanks from Kredit