1 Answer
1

You should query all accomodation posts in this country, and then sort them by accomodation-type and region. Then you loop through the posts, and compare the accomodation type and the region of each post with those of the previous post. If they are different you print the new accomodation type or region and then print the post.

You can do this sorting in the database or in PHP. In PHP could be easier, but will require many extra database queries because you do get_post_terms() for each post. In the database is faster but will require some filtering of the SQL query that WordPress will execute.

My spelling corrector wants to replace accomodation with accommodation, is it too late to change this in your code too?