If you have a category tree in your site and often you might be needing to output both child and parents in your category page template (ex: category.php or archive.php). It can be tweaked to work like as breadcrumbs.
I will show you a very easy way on how to output child and parent categories with just one line of code the wordpress has. Further this code can be also placed outside the post loop.
echo(get_category_parents($cat, TRUE, ' » ')); echo(get_category_parents($cat, TRUE, ' ')); echo(get_category_parents($cat, FALSE, ' , '));
This will output
Internet » Blogging » WordPress »
Internet Blogging WordPress
Internet , Blogging , WordPress ,
depending on the current category name.
You can also change the separator intead of raquo you can use a blank space or commas to format the output. If you specify false, it will not print links.

Similar Posts:
- How to output category name in WordPress?
- How to get parent category name in WordPress?
- How to show adsense on specific posts/pages in WordPress?
- How to get custom field value in WordPress?
- How to Apply for IEC Export code in India?
- How to insert logo in your wordpress blog?
- Rewriting MySQL Date to PHP Date Format
- 10 Best WordPress PLUGINS You Never want to MISS!
- GD star rating issue replacing default 0 valueg
- 7 Useful WordPress plugins for Clickbank affiliates

