16 column setup?

Asked on May 7, 2015 in Development.
Answered

I just found layers and love it, but still trying to figure it out. I have just started to develop a woocommerce site (and child theme) and I want to display 4 products per row and still keep a sidebar. To do that I need a 16 column grid rather than 12, is that possible to create with Layers? In that case, how?

per.svanstrom Developer
Reply
  • Possible Answers to Your Question:

  • 1 Answer(s)
    Answered on August 21, 2015. Best answer

    Hi there,

    Layers is built on a 12ths grid. You can easily achieve anything between 1 and 12 columns per row. For WooCommerce in Layers wihtout the StoreKit plugin, the column count and its primary styling is all within WooCommerce. Take a look at the woocommerce.php in the parent theme to see how we filter or hook WooCommerce to do that. Example, this specifically changes the default output to 4 per row:

    /*** Displays up to 3 related products on product posts (determined by common category/tag)*/
    if (!function_exists('woocommerce_output_related_products')){
     function woocommerce_output_related_products(){ 
    woocommerce_related_products( array( 'posts_per_page' => 12, 'columns' => 4 )); 
    // Display 4 products in rows of 3 
    }}
     

    You can copy any of those functions into your child theme functions.php. Layers hooks are referenced in our Reference section linked above, and WooCommerce hooks can be referenced here:

    http://docs.woothemes.com/documentation/plugins/woocommerce/woocommerce-codex/

    Vail Joy Layers Team
    Reply