Jump to content
Sign in to follow this  
nimbleimages

Random Image on home page

Recommended Posts

nimbleimages

I'm trying to do one of two things: Option 1: I want to have a different image load on the homepage each time it is accessed (using plugin, shortcodes, whatever) OR Option 2: Using a feature page for the home page, have the feature images load in a random order, so that each time homepage is accessed, the features show in a random order. I'm using Platform Pro. Thanks, Laurie

Share this post


Link to post
Share on other sites
timlinson

The gallery/features can't do random displays as far as I'm aware. You'll probably want to go with a plugin.. something like random image selector maybe.

Share this post


Link to post
Share on other sites
cshoffmann

I have used the Dynamic Headers plugin successfully several times: http://wordpress.org/extend/plugins/dynamic-headers/ You will need to follow the instructions for the plugin carefully, but this is an excellent plugin for random images when each page or you can specify images to show up on certain pages. Once installed and CSS correctly, it is good.

Share this post


Link to post
Share on other sites
nimbleimages

Thanks, guys. I'll try the dynamic-headers plugin. I'll let you know if it works. Nextgen can do it in a widget... So I gotta think I can make this work! Laurie

Share this post


Link to post
Share on other sites
nimbleimages

The Dynamic Header plugin works great, but now I'm having a hard time figuring out where to put the code. You're supposed to put it in headers.php, but since I want it to be in the main content area, I'm confused. I've tried putting it so many places now, I can't remember, lol... Any advice?

Share this post


Link to post
Share on other sites
timlinson

The cleanest way will be via a hook or template. The template might be the "easiest" way, although that's obviously relative. - make sure PlatformBase is your active theme in Appearance > Themes. - copy the template.content.php from the platformpro folder to platformbase folder - insert the plugin code into the template after the first line.. so the 1st 2 lines of the template would be like this: `<?php global $pagelines_layout;?>` `<?php if(function_exists('show_media_header')) { show_media_header(); } ?>` If you've uploaded some images and configured the plugin settings properly (i.e. set "Use Random Images" in the plugin settings dropdowns), you should see the image in your content area (works on my end).

Share this post


Link to post
Share on other sites
x9zero
how did you get the rotate.php to work.... I just get the alt text even though the file points to where the images are?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×