Add product navigation to WooCommerce Single Product page (3 posts)

  1. sdpetersen
    Posted 4 years ago #

    I have a client would like to be able to navigate from product to product from within the Single Product page of WooCommerce. Anthropologie does it on their product pages (obviously not WordPress): http://www.anthropologie.com/anthro/product/clothes-jackets-outervest/24382426.jsp

    I've been scouring the internet to figure out how to get that same functionality working within WordPress for WooCommerce.

    Does anyone know how to do that or can you point me to a good resource to integrating it into the theme?


  2. sk
    Posted 3 years ago #

    I couldn't see next/previous on the link you sent - that's one hectic product page!

    Woocommerce uses custom post types to show products, so navigation can be added in the same way navigation can be added to posts. Such as:

    <?php previous_post(); ?>
    <?php next_post(); ?>

    You can customise this as needed

  3. eduardovc
    Posted 3 years ago #

    Woocommerce handle products as WP post. The function above is deprecated. Use this code:

    <?php previous_post_link('&laquo; %link'); ?>
    <?php next_post_link('%link &raquo;'); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic