Add Next & Previous Product Navigation Links To WooCommerce Single Products

This code enables you to link all single products together in any theme.

No need to edit any Woocommerce files using this solution.

Simply paste the code into your chold themes functions file and previous/next links will appear.

Here’s one example ( Unstyled )

woocommerce-product-navigation

Here’s a few examples of what you can do with the code:

  • You can change the text from Previous/Next to anything else like Previous Product/Next Product.
  • You can also change the position the links display to before or after your product content or anywhere your theme includes a hook. See this hook map for examples in Genesis themes.
  • You can also style both links the same or differently using the classes included in the PHP code.
  • Link all products within the same category or all products from all categories.
  • Exclude categories from being included in both the previous and next posts.
  • Include the product page title and/or custom text in both the previous and next both links.

Members can login and access all code snippets below:

Related Code Snippets

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.