I apologize if this is a dumb question, but I am just learning PHP and Wordpress. It's probably very simple.
I have a site where the top-level nav is all parent categories, with the child categories as dropdowns. The pages are all pulling from category.php.
On the child category pages, I would like to display the current child category page title (single_cat_title, I think) for styling, but I want to exclude this feature on the parent category pages.
I've been trying to write this very simply using get_the_category() as per this example in the codex:
$category = get_the_category();
echo $category[0]->cat_name;
Any help is greatly appreciated.