WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
More Products on page (17 posts)

  1. massimoi
    Member
    Posted 1 year ago #

    Hi guys,
    I need to visualize more than 10 products on the catalog page.
    How can I do it?
    Thank you.

    http://wordpress.org/extend/plugins/woocommerce/

  2. terrytsang
    Member
    Posted 1 year ago #

    Hi, you can add below code to your theme functions.php

    //display 16 products per page
    add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 16;' ), 20 );
  3. sleepymonk
    Member
    Posted 1 year ago #

    Thank you, that was really helpful!

    I am having trouble getting more products on a single row. Right now the default (Superstore) is 5, but I would like to fill the whole width of the shop page. Is there a way to do that?

    (and please don't send me to WooCommerce documentation, I've already looked everywhere and it's no help).

  4. terrytsang
    Member
    Posted 1 year ago #

    I see. Maybe you can try below code and see how :)

    // Display 8 products per row
    add_filter('loop_shop_columns', 'custom_loop_columns');
    if (!function_exists('custom_loop_columns')) {
    	function custom_loop_columns() {
    		return 8;
    	}
    }
  5. sleepymonk
    Member
    Posted 1 year ago #

    That gave me 4 products per row instead of 5, but at least it didn't add the 5th to a row of it's own (overflow, I guess) before the next row.

  6. terrytsang
    Member
    Posted 1 year ago #

    Are you using themes from woothemes?

    If yes, try below code:

    // Override theme default specification for product # per row
    function loop_columns() {
      return 6; // 6 products per row
    }
  7. sleepymonk
    Member
    Posted 1 year ago #

    Yes, I'm using superstore theme. That override code didn't help (it's still showing 5 products per row, but at least more products on the page).

  8. terrytsang
    Member
    Posted 1 year ago #

    I think mostly related to theme css.

  9. Roy Ho
    Member
    Posted 1 year ago #

    You can't just change the items per row and expect that is what you'll see because for obvious reasons, it will depend on the size of each item in terms of the width. So if you set it to 5, does 5 of your items fit in the layout? Etc...

    So another words the size of the product image will also play a role in whether the item will fit and also the size of the layout container...

  10. sleepymonk
    Member
    Posted 1 year ago #

    There is some relationship between the width of this element (which just simply expands/contracts the image and everything with it) and the code in the functions.php file. I'm trying to figure out what I need to do to get more product on a line, not smaller, not bigger. There must be a formula for this.

  11. terrytsang
    Member
    Posted 1 year ago #

    @sleepymonk
    I will say u can have a try to alter the css for the product layout container css that contains all the products...especially the width thing. Hope it will helps.

  12. Roy Ho
    Member
    Posted 1 year ago #

    @sleepymonk - another thing to check is it depends on how your theme's CSS is set for the images. Is it fixed? Or is it 100% or max-width:100%? So those will play a part on how to approach this issue.

  13. sleepymonk
    Member
    Posted 1 year ago #

    @terrytsang - I actually started with the css code and have been fiddling with it for hours. Margins, widths, column #.

    The first bit of php code you added here (more products on the page) was really helpful.

    @splashingpixels - I just turned off dynamic image resizing in the theme options, and that has no effect. I'm going to have a look at the css for images.

    Part of the problem is there are three css files and many php files. So I am struggling with where to look.

  14. sleepymonk
    Member
    Posted 1 year ago #

    add-action( 'jumping for joy', ...

    O - K !

    There were some settings in the theme options menu specifically for woocommerce that relate to number of products per row and products per page, and also setting the page to full-width, which is what I wanted.

    I had fiddled with them some time ago with no results, but this time I went back and got closer to what I want to achieve.

    The max is still 5 products per row, so this is enlarging my images, but at least now I can go back to the css and see if I can do some further edits. It's getting better.

    I guess the general rule of thumb would be "change the look" means css edit, and "remove or add somthing" means php edit.

    Thanks for helping me, I have been really frustrated and appreciate it!

  15. luzzati
    Member
    Posted 7 months ago #

    Hi
    I have the same problem. I would like to have 4 category images instead of three on shop page.
    I tried all the suggestions I found, but nothing.
    And it is even more frustrating because when I refresh the page I see for a fraction of second the category images set 4 in one line, but then again 3.
    Any idea?
    Thanks

  16. esmi
    Forum Moderator
    Posted 7 months ago #

    @luzzati: If you require assistance then, as per the Forum Welcome, please post your own topic.

  17. jaydipsinh.parmar
    Member
    Posted 6 months ago #

    Thank you terrytsang !!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic