Help to display categories on a single post page

Hi guys, in a single post, I am wanting to display (on the front-end) a post’s hierarchical categories, with links to the child subcategories.

For example, let’s say a post is about the movie Star Wars – I would like to display the following hierarchically as shown below:

\-Actors (main category – links through to the category called “Actors”)

\–Harrison Ford (subcategory – links through to the subcategory called “Harrison Ford”)

\–Mark Hamill (subcategory – links through to the subcategory called “Mark Hamill”)

\-Director (main category – links through to the category called “Director”)

\–George Lucas (subcategory – links through to the subcategory called “George Lucas”)

\—-

I’ve tried asking this in a few places, with no luck – hopeful someone skilled in the dark art of post categories can help!

To confirm, these categories/subcats are related to a single post only – these categories/subcats would change depending on what post I am viewing.

Thanks for any help with this!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer