I’ve been trying to figure this out for a while now, and haven’t had much luck. Where do I stick this code:
if ( !current_user_can( 'edit_user' ) ) {
?>
<div id="bbpress-forums">
You do not have access to this area of the web site. Please <a href="javascript:history.go(-1)">go back</a> or <a href="#">login</a>.
</div>
<?php
} else {
(or any alternative code) …So that if a guest tries to access the bbPress location, they are rejected.
Thanks!