Replies: 0
Hello,
I’m using Underscores starter theme and added support for woocommerce:
add_action( 'after_setup_theme', 'woocommerce_support' );
function woocommerce_support() {
add_theme_support( 'woocommerce' );
}
On the product category page, there is no pagination.
I’ve tried adding the code below to functions.php
// Woocommerce pagination
function set_row_count_archive($query){
if ($query->is_archive) {
$query->set('posts_per_page', 10);
}
return $query;
}
add_filter('pre_get_posts', 'set_row_count_archive');
or added this to archive-product.php
global $query_string;
query_posts($query_string . "&posts_per_page=12");
but none of these work. Granted, I found those 2 codes on stackoverflow.com and they were a couple years old. Please can someone help me?