Павел Иванов
Павел Иванов

Reputation: 1913

How to avoid the product's limit for taxonomy in WooCommerce?

Recently I'm faced with an interesting effect which seems to go with default settings.

When you just display products in mixed order it's ok, but when you're trying to create custom category for them - there are I'm getting the limit for loop: only 12 products are displayed in tab for category's list. E.g.:

there are 12 items of watches in "Men watches" tab:

here are 12 items of watches

but in fact, there are 16 of them:

enter image description here

Usually I add categories this way using standart form:

enter image description here

and add products to them:

enter image description here

In my functions.php file I added the line to extend the amount of products globally, but it didn't help:

enter image description here

Why the amount of rendered products by their categories is limited? Where to find the code that is in charge of this case?

Upvotes: 0

Views: 496

Answers (1)

brance
brance

Reputation: 1178

There are two options you could give a try:

  1. If you are filtering by category, you are probably using the

["product_category"]

where the default per_page attribute is set to be 12. You can override that by specifying the per_page="16".

  1. Try to set a priority to your add_filter function in the functions.php file, like

add_filter("loop_shop_per page", create_function('$cols', 'return 16'), 20);

Hope you get it to work.

Greetings

Upvotes: 1

Related Questions