Have you ever wondered how to retrieve or get all categories of a post? This little snippet will help you make WordPress get all Categories of a post (both parent and children/sub categories).
WordPress: Get all Categories of a post (both parent and children/sub categories)
<?php the_category(', '); ?>
Do you know of any other way to fetch both parent and children/sub categories of a post? If yes, please share it with us in your comment below.
WordPress: Get all Categories of a post (both parent and children/sub categories)