Support » Plugin: WooCommerce » Product archive showing only 2 columns after Woocommerce 2.6.0 update

Viewing 7 replies - 16 through 22 (of 22 total)
  • You guys rock, thank you!

    Since updating woo commerce to 2.6 i’m having a similar issue, not all my products are showing
    http://www.independentlondon.com/shop/

    hey. Fix theme maxshop help me 2 columns woocommerce 2.6.

    <?php
    /**
     * The template for displaying product content within loops.
     *
     * Override this template by copying it to yourtheme/woocommerce/content-product.php
     *
     * @author 		WooThemes
     * @package 	WooCommerce/Templates
     * @version 2.4.0
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit; // Exit if accessed directly
    }
    global $product, $woocommerce_loop;
    
    if ( empty( $woocommerce_loop['loop'] ) ) {
    	$woocommerce_loop['loop'] = 0;
    }
    $col_lg 	= ya_options()->getCpanelValue('product_col_large');
    $col_md 	= ya_options()->getCpanelValue('product_col_medium');
    $col_sm	 	= ya_options()->getCpanelValue('product_col_sm');
    $column1 	= 12 / $col_md;
    $column2 	= 12 / $col_sm;
    $class_col	= "";
    $col_large 	= 0;
    
    // Store column count for displaying the grid
    if ( empty( $woocommerce_loop['columns'] ) ) {
    	$col_large = 12 / $col_lg;
    }else{
    	$col_large = 12 / $woocommerce_loop['columns'];
    }
    
    // Ensure visibility
    if ( ! $product || ! $product->is_visible() ) {
    	return;
    }
    
    // Increase loop count
    //$woocommerce_loop['loop']++;
    
    $class_col .= ' col-lg-'.$col_large.' col-md-'.$column1.' col-sm-'.$column2.' clearfix';
    
    if ( 0 == ( $woocommerce_loop['loop'] - 1 ) % $col_lg || 1 == $col_lg ) {
    	$class_col .= ' clear_lg';
    }
    if ( 0 == ( $woocommerce_loop['loop'] - 1 ) % $col_md || 1 == $col_md ) {
    	$class_col .= ' clear_md';
    }
    if ( 0 == ( $woocommerce_loop['loop'] - 1 ) % $col_sm || 1 == $col_sm ) {
    	$class_col .= ' clear_sm';
    }
    
    ?>
    <li <?php post_class($class_col); ?>>
    	<div class="products-entry clearfix">
    	<?php do_action( 'woocommerce_before_shop_loop_item' ); ?>
    		<div class="products-thumb">
    			<?php
    				/**
    				 * woocommerce_before_shop_loop_item_title hook
    				 *
    				 * @hooked woocommerce_show_product_loop_sale_flash - 10
    				 * @hooked woocommerce_template_loop_product_thumbnail - 10
    				 */
    				do_action( 'woocommerce_before_shop_loop_item_title' );
    
    			?>
    			<?php $nonce = wp_create_nonce("ya_quickviewproduct_nonce");
    				$link = admin_url('admin-ajax.php?ajax=true&action=ya_quickviewproduct&post_id='.$product->id.'&nonce='.$nonce);
    				$linkcontent ='<a href="'. $link .'" title="Quick View Product">'.apply_filters( 'out_of_stock_add_to_cart_text', __( 'Quick View', 'yatheme' ) ).'</a>';
    				echo $linkcontent; ?>
    		</div>
    
    		<div class="products-content">
    			<?php do_action( 'woocommerce_after_shop_loop_item_title' ); ?>
    			<h4><a>" title="<?php the_title_attribute(); ?>"> <?php the_title(); ?> </a></h4>
    			<?php if ( $price_html = $product->get_price_html() ){?>
    			<div class="item-price">
    				<span>
    					<?php echo $price_html; ?>
    				</span>
    			</div>
    			<?php } ?>
    			<div class="desc std">
    	        <?php echo apply_filters( 'woocommerce_short_description', $post->post_excerpt ) ?>
                </div>
    			<div class="item-bottom clearfix">
    				<?php do_action( 'woocommerce_after_shop_loop_item' ); ?>
    				<?php $nonce = wp_create_nonce("ya_quickviewproduct_nonce");
    				$link = admin_url('admin-ajax.php?ajax=true&action=ya_quickviewproduct&post_id='.$product->id.'&nonce='.$nonce);
    				$linkcontent ='<a href="'. $link .'" title="Quick View Product">'.apply_filters( 'out_of_stock_add_to_cart_text', __( 'Quick View', 'yatheme' ) ).'</a>';
    				echo $linkcontent; ?>
    			</div>
                <?php
                /**
                 * woocommerce_after_shop_loop_item_title hook
                 *
                 * @hooked woocommerce_template_loop_price - 10
                 */
                ?>
    		</div>
    	</div>

    I had the same 2 column issue by WOOcommerce clearly identified that my my template overrides were out of date. Once I put my edits into the new content-product.php – my issues were solved. Useful thread thank you!!

    Hi,
    In a nutshell, in laymens terms can someone please explain what I need to change or delete. Same problem, only displaying 2 columns. Thanks in advance.

    Moses

    (@moussamhanna)

    tried all the above and none is working
    the below CSS did it all

    .woocommerce li.product.first, .woocommerce-page li.product.first {
    clear: none;
    }

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘Product archive showing only 2 columns after Woocommerce 2.6.0 update’ is closed to new replies.