• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

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:

Register for full access

Related Code Snippets

  • 40+ Code Snippets To Modify WooCommerce Single Product Page Elements

WooCommerce

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems