Skip to:

How to show tags only to logged in users

  • Hallo,

    Please excuse my english!

    I’using “private forums” and “approve user registration” to keep my forum privat. I don’t want to show the tags to users who are not logged in.

    So I just did this <!– –> with the tags part in front-page.php.

    But is there any way to show the tags to users who are loggend in?

    For example change the front-page.php to something like:

    if (user_is_logged_in)


    <div id=”hottags”>

    <h2><?php _e(‘Hot Tags’); ?></h2>

    <p class=”frontpageheatmap”><?php bb_tag_heat_map(); ?></p>



    This would be very nice :)


Viewing 4 replies - 1 through 4 (of 4 total)

  • chrishajer


    You could use the bb_is_user_logged_in() function like this:

    <?php if ( bb_is_user_logged_in() ) { ?>
    <div id="hottags">
    <h2><?php _e('Hot Tags'); ?></h2>
    <p class="frontpageheatmap"><?php bb_tag_heat_map(); ?>
    <?php } ?>

    You were very close with your guess as to the function name.

    Just a heads up – you probably want to use the “Hidden Forums” plugin instead of “Private Forums”:

    As one user put it, “The plug-in is great, but somehow it turns off randomly”. That exact same thing happened to me twice, before I got fed up. Each time it happened, I almost had a heart attack!

    “Hidden Forums” is a better version of the plugin, and has no reports of that bug.

    Hallo and thank you so much, it works!

    For all who know even less than me about php, there is one little change to do:

    Just start the code with: <?php

    And it will work great.

    Thanks to all!



    @bamosk – I edited the original to include the <?php. Sorry about that.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar