Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter bjorlando

    (@bjorlando)

    After removing the theme code from the “content-product_cat.php” file – my problem was solved and all 4 of the columns are showing. I told the developer…You may want to review your code below to see if you can fix this bug. I rather not make changes like this for obvious reasons.

    Barry

    global $woocommerce_loop;

    // Store loop count we’re currently on.
    if ( empty( $woocommerce_loop[‘loop’] ) ) {
    $woocommerce_loop[‘loop’] = 0;
    }

    // Store column count for displaying the grid.
    if ( empty( $woocommerce_loop[‘columns’] ) ) {
    $woocommerce_loop[‘columns’] = apply_filters( ‘loop_shop_columns’, 4 );
    }

    // Increase loop count.
    $woocommerce_loop[‘loop’]++;

    // Extra post classes
    $classes = array();
    if ( 0 == ( $woocommerce_loop[‘loop’] – 1 ) % $woocommerce_loop[‘columns’] || 1 == $woocommerce_loop[‘columns’] )
    $classes[] = ‘product-category first’;
    if ( 0 == $woocommerce_loop[‘loop’] % $woocommerce_loop[‘columns’] )
    $classes[] = ‘product-category last’;

    // ThinkUpThemes Specific – Clear floating elements
    // global $post;
    global $thinkup_woocommerce_layout;
    global $thinkup_woocommerce_layoutrelated;

    $class_clear = NULL;

    if ( is_singular( ‘product’ ) ) {
    if ( $thinkup_woocommerce_layoutrelated == ‘option1’ ) {
    if( $woocommerce_loop[‘loop’] % 2 == 0) {
    $class_clear = ‘

    ‘;
    }
    } else if ( empty( $thinkup_woocommerce_layoutrelated ) or $thinkup_woocommerce_layoutrelated == ‘option2’ ) {
    if( $woocommerce_loop[‘loop’] % 3 == 0) {
    $class_clear = ‘

    ‘;
    }
    } else if ( $thinkup_woocommerce_layoutrelated == ‘option3’ ) {
    if( $woocommerce_loop[‘loop’] % 4 == 0) {
    $class_clear = ‘

    ‘;
    }
    }
    } else {
    if ( empty( $thinkup_woocommerce_layout ) or $thinkup_woocommerce_layout == ‘option1’ or $thinkup_woocommerce_layout == ‘option5’ or $thinkup_woocommerce_layout == ‘option6’ ) {
    if( $woocommerce_loop[‘loop’] % 1 == 0) {
    $class_clear = NULL;
    }
    } else if ( $thinkup_woocommerce_layout == ‘option2’ or $thinkup_woocommerce_layout == ‘option7’ or $thinkup_woocommerce_layout == ‘option8’ ) {
    if( $woocommerce_loop[‘loop’] % 2 == 0) {
    $class_clear = ‘

    ‘;
    }
    } else if ( $thinkup_woocommerce_layout == ‘option3’ ) {
    if( $woocommerce_loop[‘loop’] % 3 == 0) {
    $class_clear = ‘

    ‘;
    }
    } else if ( $thinkup_woocommerce_layout == ‘option4’ ) {
    if( $woocommerce_loop[‘loop’] % 4 == 0) {
    $class_clear = ‘

    ‘;
    }
    }
    }
    ?>

    Here is the fix:

    https://github.com/woocommerce/woocommerce/commit/bb6ded857d27d7b974ad40ee9ad0bdbcf214332e

Viewing 1 replies (of 1 total)