dalbeck

WooCommerce Featured Product Slider - Working 1.6.6

Mar 15th, 2013
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.94 KB | None | 0 0
  1. <?php if(have_posts()) : ?>
  2.  
  3.     <?php global $woocarr_width; ?>
  4.  
  5.     <!-- Elastislide Carousel -->
  6.     <div class="es-carousel-wrapper carousel-woocomm" id="1-woocomm">
  7.         <div class="es-carousel">
  8.             <ul>
  9.                 <?php while (have_posts()) : the_post(); ?>
  10.                 <?php $_product = &new WC_Product( $post->ID ); ?>
  11.                 <li>
  12.                     <div class="woocarr-thumb">
  13.                         <?php
  14.                             if ( '' != get_the_post_thumbnail() ) {
  15.                             echo '<a href='. esc_url( get_permalink( $loop->post->ID )) .' '. get_the_post_thumbnail($loop->post->ID, 'shop_catalog') . '</a>';
  16.                                 } else {
  17.                             // some code
  18.                             }
  19.                         ?>
  20.                     </div><!--end of .woocarr-thumb-->
  21.                 </li>
  22.                 <?php endwhile; ?>
  23.             <div class="clearboth"></div>
  24.             </ul>
  25.         </div> <!-- .es-carousel -->
  26.     </div> <!-- carousel-woocomm -->
  27.  
  28.     <script type="text/javascript">
  29.         jQuery('.carousel-woocomm').elastislide({
  30.             imageW  : <?php echo $woocarr_width; ?>
  31.         });
  32.     </script>
  33.  
  34. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment