Writing a loop to display posts in a subfolder

Not 100% certain, but I think Jekyll only treats subfolders as “categories” when they’re placed in _posts/.

└── _posts
   └── work
   └── another-category

You’re doing it the other way around by sticking a _posts folder within the root category folders. If you want to stick with that you can manually assign a category name to the posts with YAML Front Matter.

Adding category: work to your .md inside of /work/_posts/ should do the trick. You could also assign it to all the files in that folder using front matter defaults in your _config.yml.