Home Forums Basel support forum Products on shop page possible bug Reply To: Products on shop page possible bug

#34562

Artem Temos
Keymaster

Try to add the following PHP code snippet to the child theme functions.php file to fix this

function basel_wide_array(){
	$array = array_chunk( range( -1, 999 ), 4);
	for ( $i = 0; $i < count( $array ); $i++ ){
	  if ( ( $i % 2 ) == 0) unset ( $array[$i] );
	}
	$newArray = array_reduce( $array, function ( $carry, $item ) {
    	return array_merge( $carry, $item );
	}, []);
	return $newArray;
}

function basel_get_wide_items_array( $different_sizes = false ){
	$items_wide = apply_filters( 'basel_wide_items', basel_wide_array() );

	if( is_array( $different_sizes ) ) {
		$items_wide = apply_filters( 'basel_wide_items', $different_sizes );
	}

	return $items_wide;
}

Regards