Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function padd_theme_post_slideshow($exclude=array()) {
- wp_reset_query();
- $featured = Padd_Theme_Option::get('slideshow_cat_id');
- $count = Padd_Theme_Option::get('slideshow_cat_limit');
- query_posts('showposts=' . $count . '&cat=' . $featured);
- $padd_image_def = get_template_directory_uri() . '/images/thumbnail-slideshow.jpg';
- add_filter('excerpt_length', 'padd_theme_hook_excerpt_slideshow_length');
- ?>
- <div id="slideshow-box">
- <div class="list">
- <?php while (have_posts()) : the_post(); ?>
- <div class="item">
- <div class="image">
- <a href="<?php the_permalink(); ?>" title="Permanent Link to <?php the_title_attribute(); ?>">
- <?php
- $exclude[] = get_the_ID();
- if (has_post_thumbnail()) {
- the_post_thumbnail(PADD_THEME_SLUG . '-slideshow', array('title' => get_the_excerpt()));
- } else {
- echo '<img class="thumbnail" src="' . $padd_image_def . '" />';
- }
- ?>
- </a>
- </div>
- <div class="meta">
- <h3><a href="<?php the_permalink(); ?>" title="Permanent Link to <?php the_title_attribute(); ?>"><?php padd_theme_trim_title(25); ?></a></h3>
- <?php the_excerpt(); ?>
- <p class="read-more"><a href="<?php the_permalink(); ?>" title="Permanent Link to <?php the_title_attribute(); ?>"><span>Read More</span></a></p>
- </div>
- <div class="clear"></div>
- </div>
- <?php endwhile; ?>
- </div>
- </div>
- <?php
- wp_reset_query();
- remove_filter('excerpt_length','padd_theme_hook_excerpt_slideshow_length');
- return $exclude;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement