Last active
May 17, 2020 06:06
-
-
Save ejntaylor/6771672 to your computer and use it in GitHub Desktop.
Replace WooCommerce Default Pagination with WP-PageNavi Pagination for Woo Canvas or WooCommerce Pagination
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Replace WooCommerce Default Pagination with WP-PageNavi Pagination for Woo Canvas | |
**/ | |
add_action('init','alter_woo_hooks'); | |
function alter_woo_hooks() { | |
remove_action( 'woocommerce_after_main_content', 'canvas_commerce_pagination', 01, 0 ); | |
} | |
add_action( 'woocommerce_pagination', 'woocommerce_pagination', 1 ); // < 2.0 | |
add_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 1 ); // < 2.0+ | |
function woocommerce_pagination(){ | |
wp_pagenavi(); | |
} | |
/** | |
* Replace WooCanvas Default Pagination with WooCommerce Pagination | |
**/ | |
add_action('init','alter_woo_hooks'); | |
function alter_woo_hooks() { | |
remove_action( 'woocommerce_after_main_content', 'canvas_commerce_pagination', 01, 0 ); | |
} | |
add_action( 'woocommerce_pagination', 'woocommerce_pagination', 1 ); | |
add_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 1 ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Plugin: http://wordpress.org/plugins/wp-pagenavi/