A few weeks after I posted How to make NextGEN Smooth Gallery link to any URL (or fake a flash banner) I discovered the WP-Cycle plugin.
It’s a great plugin, much easier to use than hacking NextGen Smooth, and I wish I had found it sooner. It is way simpler for getting each image in a rotating slideshow to point to a different URL.
How I implemented it (note: this is for version 0.1.5 of the plug-in) :
(Blog title, URLs, and links blurred out in the image for client security)
- After installing the plugin, you will find the WP-Cycle settings as a sub-menu under the Plugins menu in the admin area of WordPress.
- First thing to do is to upload the images you want to appear in the slidehow, browse for and upload your images. There is currently no method to add an image from the WordPress Library or to use an image without importing it, hopefully that will change in a future release. Also, it is better if all your images are the same size.
- After uploading an image, you can enter the URL you want each image to link to. This is the strength and the best part of WP-Cycle – you can link to any URL. Be sure to include the “http://” and to click on “Update”.
- Select your settings. These are all up to your preferences. For Image Dimensions it is best if you enter the exact same size as that of the images you are planning to use. Don’t forget to “Save Settings”.
To display the rotating banner, use the shortcode to display it in a post or page or use PHP to show them where ever you please in your themes files.
The short code is:
The php is:
<?php wp_cycle(); ?>
The plugin says that you can set the DIV ID that will be used for the banner and thus be able to style it whatever way you want through CSS. I wasn’t able to do this successfully. I wanted to add a margin to the banner, so I surrounded it in another DIV with a class.
The complete code I added to the theme was:
<?php wp_cycle(); ?>
In the style sheet I added (of course you can add whatever you want, depending on the styling you want):
And there you have it. A simple rotating banner using any size of images that links to any URL for WordPress for free without using Flash or a paid program.
Please feel free to ask questions or leave comments.