Hi, Shane. I’m trying to use the_category to generate a breadcrumb trail. By default, the_category will only output categories that a post is on – it won’t return the parent category (unless you put the post in that as well, but I don’t want to).
You CAN get the_category to return the parent category too by using the ‘multiple’ setting. But then you get it like this:
– Parent,Child
with no space between them – hence my attempt to replace the ‘,’ with ‘ , ‘, or preferably ‘ > ‘.
Anyway, the change outlined in my link above allows you to change the separator for the Parent,Child values displayed. This means you can then use the_category to generate a breadcrumb trail using just one line of PHP, rather than the usual overly-complicated ways or plugins.
I go into some detail in my post on plugin-free breadcrumb trails if you’re interested.
Although let me know if I’m missing something obvious …