All filter doesn't work for page display
-
Hi,
Could you please provide us your FTP access so we can check why this option doesn’t work for you?
Thank you
Hi,
Sorry, I didn’t see the response email for this.
Login and FTP info attached. View All sorting doesn’t work.
Hello,
Try to add the following PHP code snippet to the child theme functions.php file to fix this
function woodmart_shop_products_per_page() {
$per_page = 12;
$number = apply_filters('woodmart_shop_per_page', woodmart_get_products_per_page() );
if( $number == -1 ) $number = 99999;
if( is_numeric( $number ) && $number > 0) {
$per_page = $number;
}
return $per_page;
}
add_filter( 'loop_shop_per_page', 'woodmart_shop_products_per_page', 20 );
Regards
Yes that works! Thank you
Actually, now the selected option stays after page refresh until you change it.
If I click 24 or All on the sorting filter, remove the parameters from URL or go to another page then back it’s still sorted to the last option I checked. It doesn’t default back to 12.
Yes, it is the way it works. It remembers user’s selected option so you don’t need to click it each time you visit the shop page.