Hi, guys. Thanks for the thoughts and code around this idea. We are doing something similar for our setup at SchoolPress.me and I used some of the code here, tweaked it, and started a GitHub repo for the plugin.
Instead of editing the loop in a template, I’m using the groups_get_groups filter to filter out non-site groups. I also have a couple checks in case people navigate directly to a non-site group in the frontend or dashboard.
If you have any suggestions, please open an issue at GitHub. Thanks.
As this firms up, I will probably move it into the WordPress.org repo.