Black Friday sale! Get up to 25% off GP Premium! Learn more ➝

[Support request] Woocommerce How to have different Columns Layout in Shop and Categories

Home Forums Support [Support request] Woocommerce How to have different Columns Layout in Shop and Categories

Home Forums Support Woocommerce How to have different Columns Layout in Shop and Categories

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #409431
    Mikel Mandon

    Hi GP Team

    A Woocommerce related question: How to get a 4 columns Layout in the shop and 1 column layout in Categories, currently with the customizer both are the same. Any hints?

    I added that code on the child-theme functions
    // Change number or products per row to 4
    add_filter(‘loop_shop_columns’, ‘loop_columns’);
    if (!function_exists(‘loop_columns’)) {
    function loop_columns() {
    return 4; // 4 products per row
    }
    }
    But it didn’t work…

    thanks
    Mikel

    #409463
    Leo
    Staff
    Customer Support

    Hi there,

    Maybe I’m misunderstanding something but those should have different options?

    This should apply to blog/archive/category: https://docs.generatepress.com/article/using-columns-in-the-blog/

    And this applies to shop page: https://docs.generatepress.com/article/woocommerce-overview/#shop

    Let me know πŸ™‚

    #410108
    Mikel Mandon

    Hi Leo

    Sorry by Categories I did not mean Post Categories but Product Categories. I want to have a 4 column layout at the SHOP to display the categories, and a 1 column layout at the Product Category page to display the available products at those categories, I hope that make sense.

    Thanks,
    Mikel

    #410248
    Leo
    Staff
    Customer Support

    Should be able to use this snippet here: https://docs.generatepress.com/article/using-columns-in-the-blog/#adding-columns-to-your-custom-post-type

    With is_product_category() like we tried in your other post.

    Let me know πŸ™‚

    #410252
    arabsworks

    Also the following plugin can help:
    https://wordpress.org/plugins/woo-visual-hook-guide/

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