WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Wp-e-commerce] Get category name & url

[Plugin: Wp-e-commerce] Get category name & url

  • 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?

Viewing 6 replies - 1 through 6 (of 6 total)
  • jimmyink

    @jimmyink

    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!

    <?php /** show current category */   ?>
    	<?php $output .= "<div>" .wpsc_category_name(). "</div>";  ?>

    Was looking for this answer today and found it:
    get_category_link($cat)

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

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

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

    Ooops, wrong thread. Soz.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Wp-e-commerce] Get category name & url’ is closed to new replies.