Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
56 lines (46 sloc) 2.15 KB
<?php
global $do_not_duplicate;
$do_not_duplicate = array();
$options = get_option('f8_theme_options');
$slideshow = $options['selectinput'];
$slideshow_cats = $options['cats'];
if ( $slideshow == 2 ) {
?>
<!-- Begin minimal slideshow -->
<?php query_posts('showposts=5&cat='.$slideshow_cats.''); $i=0; ?>
<div id="slideshow-posts">
<?php while (have_posts()) : the_post(); $i++; ?>
<div class="slide"><?php get_the_image( array( 'custom_key' => array( 'slideshow' ), 'default_size' => '950x425', 'width' => '950', 'height' => '425', 'image_class' => '', 'default_image' => 'wp-content/themes/f8-lite/images/default_header.jpg' ) ); ?></div>
<?php endwhile; wp_reset_query(); $i=0; ?>
</div>
<?php } elseif ( $slideshow == 3 ) { ?>
<!-- Begin slideshow with overlay -->
<ul id="slideshow-nav"></ul>
<?php $i = 0; $slideshow_query = new WP_Query("showposts=5&cat='.$slideshow_cats.'"); ?>
<div id="slideshow-posts">
<?php while ($slideshow_query->have_posts() && $i<=5) : $slideshow_query->the_post(); $do_not_duplicate[$i] = $post->ID; ?>
<?php $i++; ?>
<div class="slide">
<div class="slide-thumbnail">
<?php get_the_image( array( 'custom_key' => array( 'slideshow' ), 'default_size' => '950x425', 'width' => '950', 'height' => '425', 'image_class' => '', 'default_image' => 'wp-content/themes/f8-lite/images/default_header.jpg' ) ); ?>
</div>
<div class="slide-details">
<h2 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<div class="description">
<?php if (is_syndicated()) :
// Strip down to an excerpt
$text = get_the_content(); $text = strip_tags($text);
if (strlen($text) > EXCERPT_LENGTH_CHARS) :
$text = substr($text, 0, EXCERPT_LENGTH_CHARS) . '...<div class="more-link"><a href="' . the_permalink() . '">more &raquo;&raquo;</a></div>';
endif;
print $text;
else :
the_excerpt( );
endif; ?>
</div>
</div>
<div class="clear"></div>
</div>
<?php endwhile; wp_reset_query(); $i = 0; ?>
</div>
<?php } else { echo '<!-- No slideshow -->'; }