Support » Fixing WordPress » How to remove “Site admin” link depending on user level?

  • Resolved croila



    I’ve searched all over for the answer to this, but I can’t find it anywhere – apologies if I’ve missed something.

    I have another WP site where I need to have users logging in to read certain (but not all) news articles/posts, and they will have the absolutely lowest user level.

    I really don’t want these guys to go into “site admin” at all, and from the login screen, I’ve hacked wp-login.php so they are taken straight to the main index.php and don’t see the Control Panel at all.

    Is there any way that when they’re logged in and can read the posts they’re supposed to, the “site admin” link can be invisible? So they therefore can’t get into the Control Panel at all?

    However, for higher level users, such as Admin, I WOULD like the “site admin” link to appear.

    I’m sorry, my PHP knowledge is rubbish and I’m not sure how to approach this, so if anyone could help me I’d be ever so grateful.

    Oh, and I’m using WP 2.0, I should say.

    Kind regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • Oooh, I’ve done it.

    Just stick this in on your sidebar right after <?php wp_register(); ?>:

    <?php global $user_ID;
    if(user_can_edit_post($user_ID,$post->ID)) {

    Well, it works for me anyway 🙂



    Why is this enabled by default?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to remove “Site admin” link depending on user level?’ is closed to new replies.