Plugins
Today I wrote my very first plugin for WordPress
Just in case someone else is looking for the same thing I wrote this page.
DG Random Image
Displays a random image from one of the children of a named page. Comes in handy when using theĀ [gallery] shortcode and pages for your gallery. You can see it working on the front page. The three images in the righthand sidebar are diplayed by this plugin.
Update 2010-10-26: Now also available as a widget so you no longer have to edit your theme files.
January 8th, 2009 at 5:49 pm
A very helfull plugin – thanks.
October 25th, 2010 at 4:40 pm
Hi – really great little plugin – helped me a lot – was searching for exactly the same thing. One problem with the installation – in the pluginfolder the folder “dg_random_image.php” gets inserted two times by wordpress plugin install. And the line to implement the image is missing a bracket – ` ‘Gallery’, ‘class’ =>’alignleft’, ‘x’ => 125, ‘y’ => 125); ?>` should be …=> 125)); ?>
thx a lot for sharing
October 26th, 2010 at 6:53 pm
Uploading a new version today with widget support and fixing the problems you mentioned.
October 27th, 2010 at 8:11 am
Can’t get it to work… anyhelp?
October 27th, 2010 at 6:11 pm
What do you expect it to do and where do you get stuck? Do you use widget or code? Please be a little more specific.
November 28th, 2010 at 9:08 pm
hello guys,
I’m wondering why i can’t manage to link the random image to the page of the gallery. Your wonderful plugin manages to get the title of the page and i guess other inportant stuff i even can’t imagine!
How could i modify $sReturn = ‘ to get the link to the page ?
for the moment, i only get a link to the home page of the site.
Sandro
January 27th, 2011 at 5:02 am
Hi,
Using the widget – how could I edit the php code to center the image within the sidebar? I got the text center, but am having problems with the widget. Thanks so much.