Advertisement
Guest User

Untitled

a guest
May 7th, 2012
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. global $woocommerce_loop;
  4.  
  5. $woocommerce_loop['loop'] = 0;
  6. $woocommerce_loop['show_products'] = true;
  7.  
  8. if (!isset($woocommerce_loop['columns']) || !$woocommerce_loop['columns']) $woocommerce_loop['columns'] = apply_filters('loop_shop_columns', 4);
  9.  
  10. ?>
  11.  
  12. <?php do_action('woocommerce_before_shop_loop'); ?>
  13.  
  14. <ul class="products">
  15.  
  16.     <?php
  17.    
  18.     do_action('woocommerce_before_shop_loop_products');
  19.    
  20.     if ($woocommerce_loop['show_products'] && have_posts()) : while (have_posts()) : the_post();
  21.    
  22.         global $product;
  23.        
  24.         if (!$product->is_visible()) continue;
  25.        
  26.         $woocommerce_loop['loop']++;
  27.        
  28.         ?>
  29.         <li class="product <?php if ($woocommerce_loop['loop']%$woocommerce_loop['columns']==0) echo ' last'; if (($woocommerce_loop['loop']-1)%$woocommerce_loop['columns']==0) echo ' first'; ?>">
  30.  
  31. <?php
  32.     ob_start();
  33. ?>
  34.  
  35.            
  36.             <?php do_action('woocommerce_before_shop_loop_item'); ?>
  37.            
  38.             <a href="<?php the_permalink(); ?>">
  39.                
  40.                 <?php do_action('woocommerce_before_shop_loop_item_title'); ?>
  41.                
  42.                 <h3><?php the_title(); ?></h3>
  43.                
  44.                 <?php do_action('woocommerce_after_shop_loop_item_title'); ?>
  45.            
  46.             </a>
  47.    
  48.             <?php do_action('woocommerce_after_shop_loop_item'); ?>
  49.  
  50. <?php
  51.     $markup = ob_get_contents();
  52.     ob_end_clean();
  53.     $atts = array( "throbber" => "true" );
  54.     echo IX_LL_lazyload( $markup, $atts );
  55. ?>
  56.  
  57.            
  58.         </li><?php
  59.        
  60.     endwhile; endif;
  61.    
  62.     if ($woocommerce_loop['loop']==0) echo '<li class="info">'.__('No products found which match your selection.', 'woocommerce').'</li>';
  63.  
  64.     ?>
  65.  
  66. </ul>
  67.  
  68.  
  69. <div class="clear"></div>
  70.  
  71. <?php do_action('woocommerce_after_shop_loop'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement