Product Columns set to template

Good day,

I am struggling to change the product columns on different pages. For category Bikes I want 3 columns, but for category Accessories I want 5 columns. How can I make the template overrule the theme options?

https://capetownmotorcycles.co.za/product-category/bikes/


In my template I use this shortcode but it is not displaying this way - I want to have this overrule all other settings.

[products category="125cc" columns="3"]

[products category="T-shirts" columns="5"]

Comments

  • Hi,

    You have cooming soon page activated:

    Please disable it on Monday after 9 AM (CET) so I can check this.


    Thanks

  • Hi Phil, the coming soon page is deactivated. Please let me know if you can help 😊

  • WooCommerce styles are overwritten by ours.

    To overcome that, please use the following CSS code:

    @media only screen and (min-width:960px){
     .woocommerce.columns-5 ul.products.columns-3 li.product{
       width: 16.95%;
     }
     .woocommerce.columns-5 ul.products.columns-3 li.product:nth-child(3n+1){
       clear: unset;
     }
     .woocommerce.columns-5 ul.products.columns-3 li.product:nth-child(5n+1){
       clear: both;
     }
    }
    

    Put it in Betheme -> Theme options -> Custom CSS & JS -> CSS.


    Best regards

  • You are the best! Thank you for always helping and giving excellent support.

Sign In or Register to comment.