I'm a bit perplexed by this WP behavior: When I browse the posts for a category that has a parent category, WP seems unable to get any data for the parent category.
For example:
if (is_category('3')) { //Main category 3
if (is_category('18')) { //A subcategory of category 3
echo $cat->cat_name;
}
}
Even though I'm still in the main category 3 "environment" all data in get_the_category() is now only displaying subcategory (18) data.
Is there a WP PHP call or a method to ensure that info for the parent category is still maintained on the page, even if I've clicked on a subcat index/post/page?