How to Use WP-PageNavi With WooCommerce?

WooCommerce comes with a built in pagination feature. However, you can easily replace it with more advanced WP-PageNavi plugin by adding a tiny code snippet to your functions.php file.

Quick Tip: How to Change the WooCommerce Return to Shop Button

To replace WooCommerce pagination with WP_Pagenavi, use the following code.

remove_action('woocommerce_pagination', 'woocommerce_pagination', 10);
function woocommerce_pagination() {
        wp_pagenavi();         
    }
add_action( 'woocommerce_pagination', 'woocommerce_pagination', 10);

Source : http://www.haloseeker.com/replace-woocommerce-default-pagination-with-wp-pagenavi-pagination/

0 Comments

Leave a Comment.