Plugin Directory


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 “child of”, so you can select a random page from a specific group of pages.

Installation: 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

Author: Aviran Mordo

Author Site: http://www.aviransplace.com

Compatibility: WP 1.5

License: GPL

Download URL: http://www.aviransplace.com/index.php/get-random-page-wordpress-plugin/

Source files: http://dev.wp-plugins.org/browser/get-random-page/

Last modified 12 years ago Last modified on 12/28/05 21:36:58