{"id":19019660,"date":"2026-09-14T13:02:17","date_gmt":"2026-09-14T13:02:17","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/categories-and-subcategories-14\/"},"modified":"2026-09-14T13:02:17","modified_gmt":"2026-09-14T13:02:17","slug":"categories-and-subcategories-14","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/categories-and-subcategories-14\/","title":{"rendered":"Categories and Subcategories"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">My store isn&#8217;t yet live so can&#8217;t provide a link to the page. I am new to WordPress and inexperienced with coding.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I am trying to display the products via a parent and subcategory in my store and getting nowhere fast.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I currently have all my categories set up as parent with a display type of &#8220;subcategories&#8221; and subcategories set to &#8220;default&#8221;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On my Product Catalogue page amongst other code I was told to add the following code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!-- wp:shortcode --&gt; &#091;product_categories number =\"0\" parent=\"0\"] &lt;!-- \/wp:shortcode --&gt;<br \/><br \/><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is now displaying my parent categories and when you click through it shows the parent category with all items in all subcategories displayed and not a subcategories list to click on to show just the items in that category.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What else do I need to do?<\/p>\n","protected":false},"template":"","class_list":["post-19019660","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19019660","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19019660\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=19019660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}