• Hello,

    I would like to know if it is possible to hide certain links in the sidebar for certain users.

    It would be great if a link woudn’t be visible for people with a role lower than 5 but visible for the people with a role above 5.

    That as soon as they login the sidebar menu changes.

    Cheers,
    Karel

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kareldc2

    (@kareldc2)

    I forgot to mention that I have something similar working on my blog for the moment.

    It’s a small login form in the sidebar. When the users logs in the form dissapears and there appears a welcome message in it’s place. It works fine, but I can’t get it to work with an other link in my sidebar.

    Here’s the code:

    <?php
    global $user_ID, $user_identity;
    get_currentuserinfo();
    if (!$user_ID):
    ?>
    <br>
    <form name=”loginform” id=”loginform” action=”<?php echo get_settings(‘siteurl’); ?>/wp-login.php” method=”post”>
    <div><label><?php _e(‘Login’) ?>:
    <input type=”text” name=”log” id=”log” value=”” size=”20″ tabindex=”7″ /></label>
    <label><?php _e(‘Password’) ?>:
    <input type=”password” name=”pwd” id=”pwd” value=”” size=”20″ tabindex=”8″ /></label>
    <input type=”hidden” name=”rememberme” value=”forever” />
    <input type=”submit” name=”submit” value=”<?php _e(‘Login’); ?> »” tabindex=”9″ />
    <?php wp_register(”, ”); ?>
    <input type=”hidden” name=”redirect_to” value=”<?php echo $_SERVER[‘REQUEST_URI’]; ?>”/></div>
    </form>
    <?php
    else:
    ?>

    I too would like to do the same thing.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide link in sidebar for some users’ is closed to new replies.