Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hiding bbPress from Guests (Not Logged In)


  • jmalais
    Participant

    @jmalais

    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!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.