I’m using Recent products shortcode, [recent_products per_page="4" columns="2"]
and would like to have pagination, because I’m displaying products on homepage – and currently only 4 products are being displayed. Is there a way to add pagination?
I have imported dummy data, so there are 45 products.
Use
[recent_products limit="12" columns="4" paginate="true"]
This shortcode limit 12 means maximum 12 post on a page.more info woocommerce doc
You could consider a plugin: WP-PageNavi. In order to use it with Woocommerce, simply install and configure the plugin, then add the following code to your theme’s
functions.php
:Source: Mark van der Putten’s blog, comments ommitted.
Also, you could ask this question on the dedicated StackExchange WordPress site.
Referencing from this github gist https://gist.github.com/klihelp/7810337 Including the following code into your child-theme functions.php after installing this plugin: https://wordpress.org/plugins/prime-strategy-page-navi/
Use
[recent_products limit="12" columns="4" paginate="true"]
. This shortcode limit 12 means maximum 12 post on a page. more info woocommerce doc