Skip to:
Content
Pages
Categories
Search
Top
Bottom

button for guests

  • hello,

    i’d like to add an extra register button to the frontpage of bbpress, i tried the following code, but i had no luck (not to mention that my php knowledge is more than just basic)

    <?php if ($user->user_exists != 0) : ?>
    <li id="register_now"><a href="register.php" class="pagelink">Join Now</a></li>
    <?php endif; ?>

    thanks a bunch

Viewing 3 replies - 1 through 3 (of 3 total)
  • And using <?php login_form(); ?> to show login info with the register link won’t do?


    _ck_
    Participant

    @_ck_

    You almost have it. Try it this way:

    <?php if (bb_is_user_logged_in()) : ?>
    <li id="register_now"><a href="<?php bb_option('uri'); ?>register.php" class="pagelink">Join Now</a></li>
    <?php endif; ?>

    thank’s a ton ck, that was the right one, with a little <?php else : ?> modification of course :)

    helpful as usual.

    @Ipstenu

    nope a button was really necessary, but thanks anyways :)

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