WP-Cycle Plugin

wp-cycle

The WP-Cycle plugin allows you to upload images from your computer, which will then be used to generate a jQuery Cycle Plugin slideshow of the images.

Each image can also be given a URL which, when the image is active in the slideshow, will be used as an anchor wrapper around the image, turning the image into a link to the URL you specified. The slideshow is set to pause when the user hovers over the slideshow images, giving them ample time to click the link.

Images can also be deleted via the plugins Administration page.

Installation

  1. Upload the entire wp-cycle folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Configure the plugin, and upload/edit/delete images via the WP-Cycle menu within the Plugins tab
  4. Place <?php wp_cycle(); ?> in your theme where you want the slideshow to appear
  5. Alternatively, you can use the shortcode [wp_cycle] in a post or page to display the slideshow

Usage

The first thing you’ll want to do after you’ve installed the plugin is to configure the settings. Go to “Plugins” -> “WP-Cycle” from your WordPress Dashboard, and you should see several user-configurable settings that you can modify.

wp-cycle-settings

Next, you’ll want to do is upload some images. Make sure that all images you upload have the same, or larger, image dimensions as you specified in the settings (default is 300×200 pixels). The plugin will take care of resizing the images if they are too large.

After that, you may want to give each image a link. If an image has a URL assigned to it, then when it comes through in the slideshow, the user will be able to click on the link. Simply type the URL into the “Image Links To” column, and click “Update”.

To place the slideshow on your website, you can either use the <?php wp_cycle(); ?> template tag in your theme code, or you can use the [wp_cycle] shortcode on posts and pages.

Finally, if you ever need/want to delete an image, just click the delete button in the actions column.

Frequently Asked Questions

My images won’t upload. What should I do?
The plugin uses built in WordPress functions to handle image uploading. Therefore, you need to have correct file permissions set for your uploads directory.

Also, a file that is not an image, or an image that does not meet the minimum height/width requirements, will not upload. Images larger than the dimensions set in the Settings of this plugin will be scaled down to fit, but images smaller than the dimensions set in the Settings will NOT be scaled up. The upload will fail and you will be asked to try again with another image.

Finally, you need to verify that your upload directory is properly set. Some hosts screw this up, so you’ll need to check. Go to “Settings” -> “Miscellaneous” and find the input box labeled “Store uploads in this folder”. Unless you are absolutely sure this needs to be something else, this value should be exactly this (without the quotes) “wp-content/uploads”. If it says “/wp-content/uploads” then the plugin will not function correctly. No matter what, the value of this field should never start with a slash “/”. It expects a path relative to the root of the WordPress installation.

I’m getting an error message that I don’t understand. What should I do?
Please email me or @nathanrice me on Twitter. This plugin is still in early alpha stages, and I’m looking for good error reporting. I’ll try to fix errors as soon as I possibly can.

NOTE: If you are having trouble getting the plugin to work properly, I can no longer offer free support. If you would like help with the plugin, you will need to purchase a support package for this plugin.

How can I style the slideshow further?
In the settings of the plugin, you’re able to set a custom DIV ID for the slideshow. Use that DIV ID to style the slideshow however you want using CSS.

In what order are the images shown during the slideshow?
Chronologically, from the time of upload. For instance, the first image you upload will be the first image in the slideshow. The last image will be the last, etc.

Can I reorder the images?
Not at the moment, but this is a feature I do want to include in the plugin soon.

Can I rotate anything other than images with this plugin?
No. This is an image slideshow. Enjoy it for what it is.

Do you have future plans for this plugin?
Yes. Here are some things that I want to eventually include:

  • Add ability to reorder the images
  • Add new effects to the slideshow
  • Add options for the user to define the duration of the effect, and the time between effects via the Settings
  • Add the ability to override settings by using function arguments:
    <?php wp_cycle('rotate=1&effect=fade&img_width=300&img_height=200&div=slideshow'); ?>
  • Add shortcode ability so that you can rotate images attached to a post
  • Possibly add widget support so that you can put a slideshow in a widget area

Using this plugin with themes

If you are a theme author and what to make your theme compatible with this plugin, you have a couple of options.

First of all, the theme settings defaults are filterable. Therefore, you have the ability, from within your theme’s functions.php file, to set the defaults for this plugin. The filter you want to use is wp_cycle_defaults and you need to set your return function to return an array. For example:

<?php
add_filter('wp_cycle_defaults', 'my_theme_wp_cycle_defaults');
function my_theme_wp_cycle_defaults() {
	$defaults = array(
		'rotate' => 1,
		'effect' => 'fade',
		'img_width' => 300,
		'img_height' => 200,
		'div' => 'rotator'
	);
	return $defaults;
}
?>

Change the array values to what you need for your theme. The user will be able to change them, if they so desire, but you’ll be able to at least start them off right.

Demo

For a demonstration of how this plugin looks in action, please check out the Landscape Theme demo.

Download

This plugin is hosted at the WordPress.org Plugins directory. You can download it there.

20 Replies to “WP-Cycle Plugin”

  1. […] 0.1.5 | By Nathan Rice | Visit plugin site Xslt […]

    Reply

  2. […] van de pagina) aangepast met een plugin om foto’s te tonen. Hiervoor heb ik de plugin WP-Cycle gebruikt. Het is wel handig als je een beetje HTML en CSS kennis hebt, maar via een site als […]

    Reply

  3. […] WP-Cycle Plugin — Nathan Rice […]

    Reply

  4. […] WP-Cycle  link […]

    Reply

  5. […] If you have a problem with uploading of the images, please read carefully this post. […]

    Reply

  6. […] some good ideas in Nathan Rice’s WP-Cycle plugin for using jQuery Cycle in a WordPress […]

    Reply

  7. […] If you have a unique home page template or want the slideshow to display site-wide (like in your header), you will need to edit the theme files and add to your templates. Besides the WP-Cycle plug-in page on wordpress.org further documentation to embed the php hook in a theme is provided by the developer on his site. […]

    Reply

  8. […] it out to see if anyone else might like having new toys and tweaks on their own sites. This one is WP-Cycle – learned about it in the November Social Media Club meeting on WordPress (thanks, […]

    Reply

  9. […] 今回使用するプラグインは→WP-Cycle Plugin […]

    Reply

  10. […] also comes with up to 6 columns and is a responsive theme. I have included the WP-Cycle plugin by Nathan Rice, and I have also included an adapted version of his plugin for if you are building a […]

    Reply

  11. […]  WP-Cycle This plugin allows you to upload images from your computer, which will then be used to generate a jQuery Cycle Plugin slideshow of the images.  Each image can also be given a URL which, when the image is active in the slideshow, will be used as an anchor wrapper around the image, turning the image into a link to the URL you specified. The slideshow is set to pause when the user hovers over the slideshow images, giving them ample time to click the link. (Free Plugin) […]

    Reply

  12. […] WP-Cycle is a great plugin that just simply lets you upload images into a jQuery-based image slider for use in a WordPress page, theme, whatever. What I’ve done is added some functionality to the plugin that adds left/right arrows, as well as adding support for the scrollHorz, which is one of the default options from the original jQuery Cycle plugin. It’s nothing huge, but check out the code below, and if you like it, replace the wp-cycle.php file in the WP-Cycle plugin folder. […]

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *