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.     $i = 0;
  19.    
  20.     do_action('woocommerce_before_shop_loop_products');
  21.    
  22.     if ($woocommerce_loop['show_products'] && have_posts()) : while (have_posts()) : the_post();
  23.    
  24.         global $product;
  25.        
  26.         if (!$product->is_visible()) continue;
  27.        
  28.         $woocommerce_loop['loop']++;
  29.        
  30.         ?>
  31.         <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'; ?>">
  32.  
  33. <?php
  34.     ob_start();
  35. ?>
  36.  
  37.            
  38.             <?php do_action('woocommerce_before_shop_loop_item'); ?>
  39.            
  40.             <a href="<?php the_permalink(); ?>">
  41.                
  42.                 <?php do_action('woocommerce_before_shop_loop_item_title'); ?>
  43.                
  44.                 <h3><?php the_title(); ?></h3>
  45.                
  46.                 <?php do_action('woocommerce_after_shop_loop_item_title'); ?>
  47.            
  48.             </a>
  49.    
  50.             <?php do_action('woocommerce_after_shop_loop_item'); ?>
  51.  
  52. <?php
  53.     $i++;
  54.     if ( ( $i % 9 == 0 ) || !have_posts() ) {
  55.         $markup = ob_get_contents();
  56.         ob_end_clean();
  57.         $atts = array( "throbber" => "true" );
  58.         echo IX_LL_lazyload( $markup, $atts );
  59.     }
  60. ?>
  61.  
  62.            
  63.         </li><?php
  64.        
  65.     endwhile; endif;
  66.    
  67.     if ($woocommerce_loop['loop']==0) echo '<li class="info">'.__('No products found which match your selection.', 'woocommerce').'</li>';
  68.  
  69.     ?>
  70.  
  71. </ul>
  72.  
  73.  
  74. <div class="clear"></div>
  75.  
  76. <?php do_action('woocommerce_after_shop_loop'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement