Title: Product shortcode columns not working
Last modified: October 27, 2020

---

# Product shortcode columns not working

 *  Resolved [lemouz](https://wordpress.org/support/users/lemouz/)
 * (@lemouz)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/product-shortcode-columns-not-working/)
 * Hi,
    I use woocommerce shortcode to display my 4 last products. [products limit
   =”4″ columns=”4″ orderby=”id” order=”DESC” visibility=”visible”]
 * But it doesnt work fine : It displays 1 product per row which is ugly of course.
 * The strangest thing is that I use WP Staging to make tests before going to production
   and this works fine !
 * The bad one : [https://ibb.co/cQ7wmYS](https://ibb.co/cQ7wmYS)
    The good one :
   [https://ibb.co/xM0dJV7](https://ibb.co/xM0dJV7)
 * Thanks for your help !
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fproduct-shortcode-columns-not-working%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * (@lorro)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/product-shortcode-columns-not-working/#post-13588528)
 * Try this custom css:
 *     ```
       @media screen and (min-width: 768px) {
         ul.products li.product {
           margin: 0 1% !important;
           width: 23% !important;
         }
         .br_alabel {
           top: 40px !important;
         }
       }
       ```
   
 * Custom css can be entered at:
    Dashboard > Appearance > Customize > Additional
   CSS
 * Check other pages and device widths for unwanted side effects.
 *  Thread Starter [lemouz](https://wordpress.org/support/users/lemouz/)
 * (@lemouz)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/product-shortcode-columns-not-working/#post-13590729)
 * Hi,
    Thanks, this works OK for the front page. But this goes messy with others(
   [https://www.byaeni.fr/categorie-produit/produits-en-stock/](https://www.byaeni.fr/categorie-produit/produits-en-stock/))
 * I’d like to understand why this is OK with the site used for test but not with
   the “real” one. The staging is on the same server….
 *  [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * (@lorro)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/product-shortcode-columns-not-working/#post-13590926)
 * 1. The products-in-stock page has 5 products to a row, whereas the home page 
   has 4 to a row. I think the thing to do is restrict my snippet above to the home
   page only. Alter the second line to:
    `.home ul.products li.product {`
 * 2. Sounds like a day’s job for a hands-on dev….

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Product shortcode columns not working’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/product-shortcode-columns-not-working/#post-13590926)
 * Status: resolved