I'm creating a list of posts that have the same tag as the current post (this is in a single-post template). I need to display those posts organized by category, with the category name appearing once as a header. So the end result will simply be:
CATEGORY1
POST1
POST2
POST3
CATEGORY2
POST4
POST5
POST6
etc... All posts having the same tag as the current post, organized by category, with the category name displaying once. (All posts having this tag will only belong to one category. The current post will only have one tag.) Because of other loops on the template, this needs to use WP_Query. My PHP skills are minimal—I've spent several days searching for a solution, and have found bits and pieces that are helpful, but I've not been able to solve this problem. Any help is much appreciated.