WP – Ecommerce – Display the Current Category’s Parent Categorys Name

Here is the code you need to display the Parent Category of the Current Category you are viewing in WP E Commerce

<?php
$term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) );
$parent = get_term($term->parent, get_query_var(‘taxonomy’) );
echo $parent->name;
 ?>

GD Star Rating
loading...
GD Star Rating
loading...
WP - Ecommerce - Display the Current Category's Parent Categorys Name, 6.7 out of 10 based on 3 ratings

Tags: Current Category's Parent Categorys Name, Parent Category Name Wp Ecommerce

Trackback from your site.