{"id":112,"date":"2013-01-19T13:47:16","date_gmt":"2013-01-19T13:47:16","guid":{"rendered":"https:\/\/theextremewebdesigns.com\/blog\/?p=112"},"modified":"2013-01-19T13:47:16","modified_gmt":"2013-01-19T13:47:16","slug":"wordpress-get-all-categories-of-a-post","status":"publish","type":"post","link":"https:\/\/theextremewebdesigns.com\/blog\/wordpress-get-all-categories-of-a-post\/","title":{"rendered":"WordPress: Get all Categories of a post (both parent and children\/sub categories)"},"content":{"rendered":"<p>Have you ever wondered how to\u00a0retrieve or get all categories of a post? \u00a0This little snippet will help you make\u00a0WordPress get all Categories of a post (both parent and children\/sub categories).<!--more--><\/p>\n<h2>WordPress: Get all Categories of a post (both parent and children\/sub categories)<\/h2>\n<pre class=\"lang:php decode:true\">&lt;?php the_category(', '); ?&gt;<\/pre>\n<p>Do you know of any other way to \u00a0<strong>fetch both parent and children\/sub categories of a post<\/strong>? If yes, please share it with us in your comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever wondered how to\u00a0retrieve or get all categories of a post? \u00a0This little snippet will help you make\u00a0WordPress get all Categories of a post (both parent and children\/sub categories).<\/p>\n","protected":false},"author":1,"featured_media":114,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6,13,8,11],"tags":[29,31,30],"class_list":["post-112","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-snippets","category-tips-and-tricks","category-wordpress","category-wordpress-tips-and-tricks","tag-tips-tricks","tag-wordpress-snippets","tag-wordpress-tips"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/paBnQX-1O","jetpack_sharing_enabled":true,"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts\/112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/comments?post=112"}],"version-history":[{"count":0,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts\/112\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/media?parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/categories?post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/tags?post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}