Viewing 15 replies - 1 through 15 (of 16 total)
  • terrytsang

    (@terrytsang)

    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 );
    sleepymonk

    (@sleepymonk)

    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).

    terrytsang

    (@terrytsang)

    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;
    	}
    }
    sleepymonk

    (@sleepymonk)

    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.

    terrytsang

    (@terrytsang)

    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
    }
    sleepymonk

    (@sleepymonk)

    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).

    terrytsang

    (@terrytsang)

    I think mostly related to theme css.

    Roy Ho

    (@splashingpixelscom)

    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…

    sleepymonk

    (@sleepymonk)

    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.

    terrytsang

    (@terrytsang)

    @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.

    Roy Ho

    (@splashingpixelscom)

    @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.

    sleepymonk

    (@sleepymonk)

    @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.

    sleepymonk

    (@sleepymonk)

    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!

    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

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

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘More Products on page’ is closed to new replies.