Show parent category and subcategory once in while loop
This is untested, but you have do an nested loop where you loop parent categories and child categories. When you find an correct parent you loop the posts and check which posts have the correct category. <?php // Fetch categories in to an array // Fetch provinces in to an array // First loop your … Read more