Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Hiding objects from registered and unregistered users.

I think this isn’t the best practice but you can try this for the moment:

If you use a custom template, edit with a text editor:

my-templates/(name_of_your_templates)/front-page.php

after:

<?php bb_get_header(); ?>

add:

<?php if ( bb_is_user_logged_in() ) : ?>

before :

<?php bb_get_footer(); ?>

add :

<?php else : ?>
<?php if ( !in_array( bb_get_location(), array( 'login-page', 'register-page' ) ) ) login_form(); ?>
<?php endif; // bb_is_user_logged_in() ?>

do the same for:

my-templates/(name_of_your_templates)/topic.php

my-templates/(name_of_your_templates)/forum.php

my-templates/(name_of_your_templates)/profile.php

my-templates/(name_of_your_templates)/tags.php

my-templates/(name_of_your_templates)/tag-single.php

my-templates/(name_of_your_templates)/view.php

but your forums posts can allways be read trough the rss feed..

Skip to toolbar