Possible bug with category[0]->cat_name
-
Hi,
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[0]->cat_name;?>
Please help
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Possible bug with category[0]->cat_name’ is closed to new replies.