New Landing How can we help? Themeforest Theme Support Neighborhood To display five products in a row (home page)

Viewing 10 posts - 1 through 10 (of 10 total)
  • #180465
    dd_mel
    Member
    Post count: 46

    Hi,

    I have changed the width, the margin and the paddings to display 5 products in a row (home page using page builder element – product). However, the width fits, but can still only display 4 products, with one blank (see attachment).

    Should I add something in function.php?

    Thank you.

    Regards,
    Rebecca

    Attachments:
    You must be logged in to view attached files.
    #180479
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste this functions.php file of child theme.

    function loop_columns() {
    return 5; // 5 products per row
    }
    add_filter('loop_shop_columns', 'loop_columns', 999);

    Thanks
    Mohammad

    #180524
    dd_mel
    Member
    Post count: 46

    Hi Mohammad,

    Thanks for that. However, the home page does not display well after I add those codes in functions.php of child theme. I just pasted them directly.

    Should I add something or ?

    Thank you.

    Regards,
    Rebecca

    #180525
    dd_mel
    Member
    Post count: 46
    This reply has been marked as private.
    #180531
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    please wrap this code with php tag like this:-

    <?php
    //your code
    ?>

    Thanks
    Mohammad

    #181259
    dd_mel
    Member
    Post count: 46

    Hi Mohammad,

    Thanks for the tag, however, it didn’t work… Anything I can do to make it work?

    Thank you.

    Regards,
    Rebecca

    #181270
    dd_mel
    Member
    Post count: 46

    Hi,

    I found the products in home page are still displayed four in one row (used swift page builder “product”). However, after using above code, the product in “product page” are displayed 5 in one row.

    What I would like to change is the home display (swift page builder – “product”).

    Thank you.

    Regards,
    Rebecca

    #181298
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    I’m afraid currently there is no 5 column layout for the products asset, we use bootstraps 12 column grid therefore it’s not possible to have 5 even-width columns

    – Kyle

    #181668
    dd_mel
    Member
    Post count: 46

    Hi Kyle,

    Thanks for that.

    So is it possible to display 6 in a row then? I changed the width and found it is ok to display 6 in a row (I used inspect element in chrome), however, no matter how I changed the width, it will only display 4.

    I mean that I changed the width to 155 which 6 in a row is OK, and then add this css in child theme. After refresh, the page, it still displayed four in a row, and leave two blank (as there should be six).

    Thank you.

    Regards,
    Rebecca

    #181673
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Yes, in your products asset option set the size to mini: http://d.pr/i/1cB2V/1cGpofhV

    – Kyle

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register