WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

DG Random Image

Displays a random image from one of the children of a named page, i.e. Gallery -> 2008 -> Holiday -> picture1

In my blog I use pages for the gallery. I have a main index Gallery that has children for each year which contain the actual gallery pages.

I wanted to display a random image from this gallery and couldn't find a plugin to do it so I wrote my own. Usage is really simple: The following line in your template <?php echo DG_Random_Image(array('title' => 'Gallery', 'class' =>'alignleft', 'x' => 125, 'y' => 125)); ?> or just use the widget.

title is the name of the index page, no pictures will be taken from this page, only from childpages.

class is an optional class to assign to the image

x is the width to assign to the thumbnail

y is the height to assign to the thumbnail

It will output the thumbnail for this picture with the given dimensions, linked to the page it belongs to.

Requires: 2.5 or higher
Compatible up to: 3.0.5
Last Updated: 2010-10-26
Downloads: 1,303

Ratings

3 stars
3.3 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
0,1,0
100,2,2 100,1,1