@Travel-Junkie and @iamjoshfrank I’ve just implemented your ‘sh walled garden’ code to shield my community pages from prying eyes, and it works great.
I was wondering however if you knew a way I could make an exception for the BuddyPress Links Directory (it’s a plugin, so there is no kind of conditional tag for this, as far as I know).