specifying grid columns by category

I need to be able to specify the number of columns in the product grid by category. Specifically, this category needs to be 3 columns (which it is):
http://divinationbygeorge.com/l-rods-by-george/

While this category needs to be 4 columns:
http://divinationbygeorge.com/scrying-mirrors-by-george/

  • Vinod Dalvi

    Hi @hostricity,

    I hope you are well today and thank you for your question.

    You can achieve this by adding the following CSS code in the style.css file of your child theme or add it in your site using the following plugin.

    https://wordpress.org/plugins/simple-custom-css/

    @media only screen and (min-width: 992px){
    body.page-id-92 .mp_products-grid .mp_product_item-col-3:nth-child(4n+1) {
      clear: both;
      margin-right: 0;
    }
    body.page-id-92 .mp_products-grid .mp_product_item-col-3:nth-child(3n+1) {
      clear: none;
      margin-right: 0;
    }
    body.page-id-92 .mp_products-grid .mp_product_item-col-3:nth-child(3n),
    body.page-id-92 .mp_products-grid .mp_product_item-col-3:nth-child(2n+1) {
      margin-right: 3%;
    }
    }
    body.page-id-92 .mp_product_item.mp_product_item-col-3 {
      width: 22.5%;
      float: left;
      margin-bottom: 3%;
    }
    body.page-id-92 .entry-content-full {
      max-width: 100%;
    }

    Best Regards,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.