Support

Account

Home Forums General Issues True/False Product Category Reply To: True/False Product Category

  • Thank you, I tried a few options but I am doing something wrong…
    I get the 1 column layout applied to every category

    /*Use 1 column layout for art series with one work*/
    add_filter( 'option_generate_woocommerce_settings','lh_custom_category_wc_columns' );
    function lh_custom_category_wc_columns( $options ) {
        if (  $query->query_vars['product_cat']  ) {
    
    		$query->set('meta_key', 'series_one_work');
    		$query->set('meta_value', '1');
    
    		}
    		
    	{
            $options['columns'] = 1;
        }
        
        return $options;
    }