Products view is broken, Unable to get uniform grid view
-
Hello, Last week I updated to Woo-commerce Version 2.6.2. After that I was unable to view the product list on my site properly. There is unexpected new lines after 1/2/random number of products.I will give a list of everything I tried –
1. I tried various plugins like “Product archiver” , “Woocommerce Product Per Page” and “Woocommerce Grid View”. Nothing changed at all. When I was setting product count to 4, it appeared 2 per row. When I set the product count to 3, it appeared, random numbers (1 or 2 products) per row.2. I searched web alot, found that function.php can do the work. I applied this code –
function rossi_loop_columns() { //VG Rossi is my theme
return 4; // 4 products per row
}
add_filter(‘loop_shop_columns’, ‘rossi_loop_columns’, 999);
Again Nothing happened.
3. Now I came to CSS, applied everything that was on web.Nothing happened.4. I somehow got one post regarding removal of first and last class to get the original theme style.
add_filter( ‘post_class’, ‘prefix_post_class’ );
function prefix_post_class( $classes ) {
if ( ‘product’ == get_post_type() ) {
$classes = array_diff( $classes, array( ‘first’, ‘last’ ) );
}
return $classes;
}It partially solved my problem , but still the first row contained only 1 product (all the other rows had 3 products, it was again not working with 4).
5. I deactivated all my plugins, nothing happened.
Urgent solutions needed. Please help me to revert back into all 3/4 products on category page.
- The topic ‘Products view is broken, Unable to get uniform grid view’ is closed to new replies.