August 1, 2022 | Posted in WordPress
There are several ways you can set up WooCommerce pagination on your WooCommerce theme.
[products limit="12" columns="4" paginate="true"]
Log in to your WordPress account and open the control panel. Next, go to Appearance and select Customize.
add_filter( 'loop_shop_per_page', 'priduct_pagination', 8 );
function priduct_pagination( $products ) {
$products = 8
return $products;
}
I try to avoid using plugins to achieve straightforward functionality. If you prefer, there is a popular plugin to create pagination. The plugin is called WP-PageNavi.
Install and activate this plugin and add the following code snippet into the function.php file.
remove_action('woocommerce_pagination', 'woocommerce_pagination', 10);
function woocommerce_pagination() {
wp_pagenavi();
}
add_action( 'woocommerce_pagination', 'woocommerce_pagination', 10);
The above code I found here
WooCommerce stores can create and customize pagination in many ways, but the four methods above are the easiest and most convenient.