[Plugin: Wp-e-commerce] Get category name & url (7 posts)

  1. NativePaul
    Posted 7 years ago #

    I've been struggling with what I imagine is a very simple thing to do.
    I'm editing my theme files and want to display the Product Category alongside the Product Name.
    What is the php function to call the Category Name and URL to that category?

    I was able to get the name using wpsc_category_name();
    Although this doesn't retrieve anything on the products page. I want the category to be listed there too.

    How can I retrieve the url to display all products in that category?

  2. jimmyink
    Posted 6 years ago #

    I'm also experiencing the same issue. I can retrieve the category name on the single product page but now when it's listed.

    Keen to find out!

  3. gaf
    Posted 6 years ago #

    <?php /** show current category */   ?>
    	<?php $output .= "<div>" .wpsc_category_name(). "</div>";  ?>
  4. yankeerudy
    Posted 6 years ago #

    Was looking for this answer today and found it:

    Use it within a page to get the category URL, while
    will get you the category name.

  5. yankeerudy
    Posted 6 years ago #

    woops, spoke too soon -- that only worked on a category page, not on a single post page.

  6. amogle
    Posted 6 years ago #

    any updates on this. I am looking for something similar.

  7. Steph
    Posted 6 years ago #

    Ooops, wrong thread. Soz.

Topic Closed

This topic has been closed to new replies.

About this Topic