• MiKeZZa

    (@mikezza)


    Can somebody help me with a solution for only having 1 product per line on the provided URL?

    I’ve went to the customer and there it says 4, I’ve also added this code to functions.php:

    //number of products per line
    add_filter('loop_shop_columns', 'loop_columns', 999);
    if (!function_exists('loop_columns')) {
    function loop_columns() {
    return 4;
    }
    }

    But still 1 product per page. I’m completely lost… Somebody an idea where this behaviour (that started after an update I think….?) is coming from?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • function loop_columns() {
    return 3; // 3 products per row
    }
    add_filter(‘loop_shop_columns’, ‘loop_columns’, 999);

    maybe you need adjust it with some css like

    @media (max-width: 499px) {
    .site-main ul.products.columns-3 li.product

    Thread Starter MiKeZZa

    (@mikezza)

    You maybe missed some code @chris2201 ? Seems to be incomplete…

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi @mikezza,

    Thank you for reaching out!

    While we may not be able to help with customization requests, I recommend you try the following:

    1. Running the exact question you’re asking, along with the code provided, through an AI platform like ChatGPT for recommendations/changes to your code;
    2. Checking whether there are existing plugins in the WordPress plugin repository that might be doing that already.
    3. Joining our WooCommerce Slack community (it does have a developer channel where you can ask coding questions): https://woo.com/community-slack/

    Hope it helps!

    @mikezza I did not complete the css code, because it depends on the theme you are using.
    Learn about @media function and inspect your website which classes you need to modify with css.

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