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

VN:F [1.9.22_1171]
Rating: 6.7/10 (3 votes cast)
VN:F [1.9.22_1171]
Rating: -3 (from 3 votes)
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.