WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Products with Previous/Next Links (1 post)

  1. hs64
    Member
    Posted 1 year ago #

    Hi, I am wondering if it is possible to check for the current Product Category within a Single Product Page to display something like Previous/Next Links looping through all Products of the Category.

    Also I want to display the current Status like this: Product 3 of 8

    Can anybody help me with this?

    There is a script to loop through all pages, but I cannot figure out how to use it on the Single Product Page:

    <?php
      $pagelist = get_pages('sort_column=menu_order&sort_order=asc');
      $pages = array();
        foreach ($pagelist as $page) {
        $pages[] += $page->ID;
        }
      $current = array_search(get_the_ID(), $pages);
      $prevID = $pages[$current-1];
      $nextID = $pages[$current+1];
    ?>

    http://wordpress.org/extend/plugins/woocommerce/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic