SHARE
TWEET

slider colorlib

a guest Sep 8th, 2017 107 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function benelux_featured_slider() {
  2.     echo '<div class="flexslider">';
  3.       echo '<ul class="slides">';
  4.  
  5.         $count = of_get_option( 'sparkling_slide_number' );
  6.         $slidecat =of_get_option( 'sparkling_slide_categories' );
  7.  
  8.         $query = new WP_Query( array( 'cat' =>'230','posts_per_page' =>$count ) );
  9.         if ($query->have_posts()) :
  10.           while ($query->have_posts()) : $query->the_post();
  11.  
  12.           echo '<li><a href="'. get_permalink() .'">';
  13.             if ( (function_exists( 'has_post_thumbnail' )) && ( has_post_thumbnail() ) ) :
  14.               echo get_the_post_thumbnail();
  15.             endif;
  16.  
  17.               echo '<div class="flex-caption">';
  18.                   if ( get_the_title() != '' ) echo '<h2 class="entry-title">'. get_the_title().'</h2>';
  19.                   if ( get_the_excerpt() != '' ) echo '<div class="excerpt">' . get_the_excerpt() .'</div>';
  20.               echo '</div>';
  21.               echo '</a></li>';
  22.               endwhile;
  23.             endif;
  24.  
  25.       echo '</ul>';
  26.     echo ' </div>';
  27.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top