Created
September 9, 2013 08:50
-
-
Save kloon/6493114 to your computer and use it in GitHub Desktop.
WooCommerce Previous & Next product links
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
<?php | |
// Add previous and next links to products under the product details | |
add_action( 'woocommerce_single_product_summary', 'wc_next_prev_products_links', 60 ); | |
function wc_next_prev_products_links() { | |
previous_post_link( '%link', '< Previous' ); | |
echo ' | '; | |
next_post_link( '%link', 'Next >' ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment