Here's the gist: you create a slider group; add slides and assign them to the group and give them an order; then use simple shortcodes to embed a slider in a page or post.
Create a Slider Group
To create a slider group, go to Sliders/Slider Groups and add a new group category.
For example, if you wanted to have a specific slider that is shown an About Us page, you might create a group called About Us so you can easily identify it in the future.
Adding slides is as easy as:
- Go to Sliders / New Slider - this will allow you to create a single slide that will appear in a slider category.
- Give your slide a title.
- If you wish to show text (or render HTML) in the body of the slider, you can put your text or markup in the main body of the slide post.
- Give this slide an order in its group. If you want it to show first in your About Us slider, set Order to 1 under Slider Data.
- Assign the slide to a group. If you haven't already created a group, click on the Add New Category link in the Slider Groups box and add one.
- Upload your slider image using the WordPress Media Uploader, if it hasn't already been uploaded.
- Set the Featured Image for each slide to display your desired slider image.
Note: You can embed an image in step 3 above, but this isn't the intended way to add your slider images. The better way is to set the featured image for each slide.
Embed a slider in a page or post using shortcodes:
- Adds a slider, but only if there is a slider post tagged with a group 'home-slider'. Defaults to three slides of medium size. (as defined by Media Settings in WordPress Dashboard)
- Adds slides from a custom group. Defaults to 3 slides of medium size
- changes default quantity to 5. (group is required if you don't have a home-slider group created)
- Where size is thumbnail, medium, large, full or a string in the format w,h (width,height) - see get_the_post_thumbnail() in the WP Codex for more information.
Note: You can combine options in your shortcode like so:
[ic_do_slider quantity='3' thumb_size='thumbnail' group='about-us']
- Adds slides from a custom group. Defaults to 3 slides of medium size.
Embed a slider directly in your theme template
You can drop the following WordPress function in your template, replacing the
[shortcode] part with your, custom shortcode.
<?php echo do_shortcode("[shortcode]"); ?>
In the About Us example above, you'd use:
<?php echo do_shortcode("[ic_do_slider quantity='3' thumb_size='thumbnail' group='about-us']"); ?>
- Suggest a feature...