Posts Tagged ‘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)