I have typical parent and child categories setup as follows:
In my index.php template I'd like to list the categories of the specific post. The problem is, when I use the_category() it lists the parent categories twice. I'm using the following code:
<php echo '<dt>', the_category(', ', 'multiple'), '</dt>', "\n"; ?>
And it prints out:
Food:corn, Food, Food:potatoes
I believe it is listing the child category "corn" as "Food: corn" followed by the parent category "Food" just as "Food." Is there a way to exclude the parent categories?
The way I'd like it to read is: