GeneratePress and WooCommerce Issue

Incorrect mobile display on WooCommerce pages

This affects customers using: 

  • GeneratePress Premium
  • WooCommerce
  • Optimize CSS Delivery and Mobile Caching in WP Rocket

Problem

On mobile devices, the WooCommerce products are displayed with the incorrect number of columns. e.g you set it to show 2 columns, but now it's displaying 4 columns per row. The problem may only occur in Chrome. 


Solution

Exclude the following files from Minify/Combine CSS (if activated) and Optimize CSS Delivery:

/wp-content/plugins/woocommerce/assets/css/woocommerce-smallscreen.css
/wp-content/plugins/gp-premium/woocommerce/functions/css/woocommerce-mobile.min.css

Minify/Combine

Go to File Optimization > Excluded CSS files and paste the above files.

Optimize CSS Delivery

To exclude files from this option, a helper plugin must be used. You can download one already configured with the correct exclusions here:

📥   Download (.zip):  WP Rocket | Exclude GeneratePress/WooCommerce Files from Async CSS
Developers: You can find the code for this plugin on GitHub.

Upload the plugin to your site, activate it, and then clear the WP Rocket cache. The problem will be resolved.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.