[Resolved] Separating product list and categories list layouts in WooCommerce Shop Page?

Home Forums Support [Resolved] Separating product list and categories list layouts in WooCommerce Shop Page?

Home Forums Support Separating product list and categories list layouts in WooCommerce Shop Page?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1141755
    Filippo

    Hi there,

    currently, my main woocommerce Shop page is set to display only the product categories, it’s basically a grid where each Category has its own title and image.

    Unfortunately, I noticed that when I adjust the number of products per page, or the number of product columns, using the WC add-on, that will work for both the list of products AND for the list of categories.

    For example, I wish I could set 3 columns for the list of categories and set 1 column for the list of products (no grid).

    Any advice?

    #1141913
    Leo
    Staff
    Customer Support
    #1168240
    Filippo

    Thanks for your help, and sorry for the late reply.

    Worked like a charm, I’m sharing the code below, hopefully it will be helpful for other forum users:

    add_filter( 'option_generate_woocommerce_settings','lh_custom_category_wc_columns' );
    function lh_custom_category_wc_columns( $options ) {
        if ( is_shop() ) {
            $options['columns'] = 3;
    	$options['product_archive_image_alignment'] = center;
    	$options['product_archive_alignment'] = center;
        }
        
        return $options;
    }

    Also, it would be nice to see some options for setting the space between the columns too, in the future. I’m using the Spaces module.

    #1168621
    Leo
    Staff
    Customer Support

    Thanks for reporting back ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.