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

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.