| 开发者 | paraplegicpanda |
|---|---|
| 更新时间 | 2014年3月18日 05:16 |
| 捐献地址: | 去捐款 |
| PHP版本: | 3.0 及以上 |
| WordPress版本: | 3.4.2 |
[slyd] shortcode to display the Slydr.<?php slyd(); ?>.slyd folder to the /wp-content/plugins/ directory[slyd] in the page Slydr is to display or place <?php slyd(); ?> in your templatesEither use the shortcode [slyd] in the page Slydr is to display or place <?php slyd(); ?> in your templates.
The Slyd shortcode supports the following options:
category - Add the category(s) you want Slyd to be limited to. Default is all categories.slydcount - How many posts you want Slyd to display. Default is 5.nav - Determines how to display the navigation arrows. Options are show for always visible arrows, hide to get rid of the arrows entirely, or hover to only display the arrows when a user hovers over the Slydr. Defaults to hover.height - Set the height for your Slydr. Must be defined in pixels, but don't include the unit (i.e. height='500'). Defaults to the height of your tallest slyd image.width - Set the width for your Slydr. Can be defined in any unit - i.e. %, px, em, etc. - and must include the unit (i.e. width='960px'). Defaults to 100%.outline - Set an outline for your Slydr. Can be defined as any CSS readable color (i.e. #00f, #0000ff, rgba(0, 0, 255, 1), red) or set to none. Defaults to black.show_titles - Show/Hide blog titles. Can be set to either true or false. Defaults to true.show_captions - Same as show_titles, but for your blog's excerpt.caption_length - Set the length of Slyd captions in characters. Defaults to 150.speed - Set the speed for your Slydr, i.e. how long a slyd will stay before switching to the next one. Define in milliseconds (1000 = 1 second). Defaults to 4000 or 4 seconds.autoadvance - Set to false to stop autoadvance. Defaults to true.use_featured - Determines when Slyd should use Featured images. Options are always to use Featured images instead of Slyd images, noslyd to only use it if there is no Slyd image, or never to only use Slyd images. Defaults to never.no_links - Set this to 'true' to use Slyd as a slideshow. Defaults to 'false'.custom_loading_image - Set this to the path to your custom loading image, i.e. http://mywebsite.com/images/custom_loader.gif. Disabled in this versionnav_images - Set this to the directory of your navigation images, i.e. http://mywebsite.com/images/. This assumes your nav images are called next.png and previous.png respectively.nav_prev - Set this to the path to your previous image, i.e. http://mywebsite.com/images/previous.png.nav_next - Set this to the path to your next image, i.e. http://mywebsite.com/images/next.png.custom_loading_image, nav_images, nav_prev, and nav_next all need an absolute path to your image. This means the path must include your domain name, i.e. /images/previous.png won't work, but http://mywebsite.com/images/previous.png will. These four options will be heavily modified in the future to make them much simpler and more extensible.
Usage
[slyd category='foo' slydcount='3', nav='show' height='300' width='960px' outline='orange' show_titles='false' show_captions='false' caption_length='200' speed='3000' autoadvance='false' use_featured='false' no_links='always' custom_loading_image='mywebsite.com/loading.gif' nav_images='mywebsite/nav_images/' nav_prev='mywebsite/nav_images/previous.png' nav_next='mywebsite/nav_images/next.png']
The Slyd template tag supports the same options as the shortcode. Use all to get all categories, i.e. <?php slyd( 'all', 3, ... , 'always' ?>
Usage
<?php slyd( $category, $slydcount, $nav, $height, $width, $outline, $show_titles, $show_captions, $caption_length, $autoadvance, $speed, $use_featured, $no_links, $custom_loading_image, $nav_images, $nav_prev, $nav_next ); ?>
<?php slyd( 'foo', '3', 'show', '300', '960px', 'orange', false, false, 200, false, 3000, false, 'always', 'mywebsite.com/loading.gif', 'mywebsite/nav_images/', 'mywebsite/nav_images/previous.png', 'mywebsite/nav_images/next.png' ); ?>
If you just can't figure out how to use Slyd, shoot me an email! I'm happy to help and thus further my name in preparation for world domina... I mean, I offer customer support. Email: tre [at] trezy [dot] com Website: http://trezy.com
use_featured to use always, never, or noslyd instead of true or false.category to use all to display all posts.use_featured attribute.caption_length attribute.no_links attribute.nav to change when the navigation arrows display.autoadvance attribute can change this and speed attribute can adjust the speed. Hovering over the Slydr pauses the auto advance.