More products on shop and shop category

Posted in: Newsmag
Post count: 2

Hi currently on the shop and shop category only 6 products per page.

How do I set it so there are more products shown at one time? 6 is really small.

Thanks

Post count: 6535

Hi

You need to modify the parameter that returns the number of products on page, like here: http://screencast.com/t/ph7oXxgBVumx

Thanks!

Post count: 2

OK great,

A bit new to this but I moved this code into my functions.php in my child theme, changed the number and it didnt work.

// Number of product per page 6
add_filter(‘loop_shop_per_page’, create_function(‘$cols’, ‘return 15;’));

if (!function_exists(‘woocommerce_output_related_products’)) {
// Number of related products
function woocommerce_output_related_products() {
woocommerce_related_products(array(
‘posts_per_page’ => 3,
‘columns’ => 3,
‘orderby’ => ‘rand’,
)); // Display 3 products in rows of 1
}
}

My question is, how do i change this without it not changing in a future update. Do I have to move the whole of the functions.php into the childtheme folder? If I did would your future updates still work?

Post count: 6600

Hi,

The child theme functions file doesn’t overwrite the main theme’s one, that is the standard child theme functionality, you have to set a higher priority for the hook that alters the product number, like this: http://screencast.com/t/AnYuIV53k add that 11 precede by a comma like in the screenshot then test again.

Thanks

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newsmag’ is closed to new topics and replies.