I have a webshop and I'm trying to get the current category for a certain item displayed within the loop.
This works fine for the most part.. But with some categories the parent seems to be displayed instead.
Since I use YAK I have to put the item in both the category and it's parent.
The code I use is
<?php$category = get_the_category(); echo $category->cat_name;?>