Difficulty: Advanced

How to Display Posts on a Category Page, Divided Into Their Respective Subcategories

wordpress sort categories and subcategories

Say you have a category page on which you’re asked to display all the posts that belong to that category’s subcategories. So far no sweat – a category page displays by default all its descendant posts, whether they belong directly to that category or any of its subcategories. But here’s the twist: say you have to display them in such a way that the subcategory names are displayed (challenge no. 1), and under each subcategory’s name you have to display all its posts (challenge no. 2).







25 Free Time-Saving Online Tools for WordPress Developers

tools on a brown wooden table

As Fred wrote in an earlier post, learning WordPress development is hard. It’s not just a case of being able to write code. There’s a heap of associated skills: analysis, design, SEO, copywriting, user experience, maintenance and more.