Advertisement
Guest User

Untitled

a guest
Jan 31st, 2015
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. function sparkling_featured_slider() {
  2. if ( is_front_page() && of_get_option( 'sparkling_slider_checkbox' ) == 1 ) {
  3. echo '<div class="flexslider">';
  4. echo '<ul class="slides">';
  5.  
  6. $count = of_get_option( 'sparkling_slide_number' );
  7. $slidecat =of_get_option( 'sparkling_slide_categories' );
  8.  
  9. $query = new WP_Query( array( 'cat' =>$slidecat,'posts_per_page' =>$count ) );
  10. if ($query->have_posts()) :
  11. while ($query->have_posts()) : $query->the_post();
  12.  
  13. echo '<li><a href="TUTAJ_ADRES_STRONY_PORTFOLIO">';
  14. if ( (function_exists( 'has_post_thumbnail' )) && ( has_post_thumbnail() ) ) :
  15. echo get_the_post_thumbnail();
  16. endif;
  17.  
  18. echo '<div class="flex-caption">';
  19. if ( get_the_title() != '' ) echo '<h2 class="entry-title">'. get_the_title().'</h2>';
  20. if ( get_the_excerpt() != '' ) echo '<div class="excerpt">' . get_the_excerpt() .'</div>';
  21. echo '</div>';
  22.  
  23. endwhile;
  24. endif;
  25.  
  26. echo '</a></li>';
  27. echo '</ul>';
  28. echo ' </div>';
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement