Change the quantity of products to be displayed in woocomerce [closed]

0

How can you modify the number of products to display without inheriting it from the amount of wordpress post?

For whatever reason, I want to have in my list of articles 4 per page in my product list 12 per page

    
asked by Daniel Díaz 29.11.2016 в 15:29
source

1 answer

0

The solution is simple, in the file functions.php you have to add the following line:

add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 12;' ), 20 );

This is a woocomerce filter that will interpose between the call of the product loop by modifying the quantity of products to be displayed.

    
answered by 29.11.2016 / 15:29
source