Skip to content

Instantly share code, notes, and snippets.

@kloon
Created September 9, 2013 08:50
Show Gist options
  • Save kloon/6493114 to your computer and use it in GitHub Desktop.
Save kloon/6493114 to your computer and use it in GitHub Desktop.
WooCommerce Previous & Next product links
<?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