Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $featured_on = get_theme_option('slider_on');
- $featured_category = get_theme_option('feat_cat');
- $featured_number = get_theme_option('feat_cat_count');
- $featured_post = get_theme_option('feat_post');
- ?>
- <?php if($featured_on == 'Enable'): ?>
- <!-- SSLIDER -->
- <div id="slider">
- <ul id="sliderContent">
- <?php if(!$featured_category && !$featured_post): ?>
- <?php else: ?>
- <?php if($featured_category): ?>
- <?php
- $post_count = 1;
- $arraypost = array('left','right');
- $query = new WP_Query( "cat=$featured_category&posts_per_page=$featured_number&orderby=date" );
- while ( $query->have_posts() ) : $query->the_post();
- $inputpost = array_rand($arraypost,1);
- $theposition = $arraypost[$inputpost];
- ?>
- <li class="sliderImage">
- <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
- <?php echo get_featured_post_image("", "", 640, 480, "alignnone", "full", $post_count ,get_the_title(), true); ?>
- </a>
- <span class="<?php echo $theposition; ?>">
- <h1><?php the_title(); ?></h1>
- <p><?php get_the_featured_excerpt($excerpt_length=70); ?></p>
- </span>
- </li>
- <?php $post_count++; endwhile; wp_reset_query(); ?>
- <?php elseif($featured_post && !$featured_category): ?>
- <?php
- $post_count = 1;
- $arraypost = array('left','right');
- query_posts( array( 'post__in' => explode(',', $featured_post), 'post_type'=> array('post','portfolio'), 'posts_per_page' => 100, 'orderby' => 'date', 'order' => 'DESC' ) );
- while ( have_posts() ) : the_post();
- $inputpost = array_rand($arraypost,1);
- $theposition = $arraypost[$inputpost];
- ?>
- <li class="sliderImage">
- <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
- <?php echo get_featured_post_image("", "", 640, 480, "alignleft", "full", $post_count ,get_the_title(), true); ?>
- </a>
- <span class="<?php echo $theposition; ?>">
- <h1><?php the_title(); ?></h1>
- <p><?php get_the_featured_excerpt($excerpt_length=70); ?></p>
- </span>
- </li>
- <?php $post_count++; endwhile; echo '<li class="sliderImage"></li>'; wp_reset_query(); ?>
- <?php endif; ?>
- <?php endif; ?>
- </ul>
- </div>
- <!-- // END SSLIDER -->
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement