WordPress.org

Ready to get started?Download WordPress

Forums

Please help me to remove the top tool bar for suscribers (12 posts)

  1. watchersnplayers
    Member
    Posted 3 years ago #

    Please help me to remove the top toolbar for all subscribers by Admin

    please Help me

    here is a snapshot of the tool bar i want to remove please help me.

    http://www.watchersnplayers.com/wp-content/uploads/2011/06/tool-bar-remove.jpg

  2. keesiemeijer
    moderator
    Posted 3 years ago #

    Put this in your theme's functions.php: show_admin_bar(false);

  3. watchersnplayers
    Member
    Posted 3 years ago #

    Well I want to remove the tool bar only for Subscribers not for Admin.
    is there anyway please help me

  4. keesiemeijer
    moderator
    Posted 3 years ago #

    if (!current_user_can('administrator')) { show_admin_bar(false); }

    or

    if (!current_user_can('manage_options') ) { show_admin_bar(false); }
  5. watchersnplayers
    Member
    Posted 3 years ago #

    is it like this

    show_admin_bar(false);
    if (!current_user_can('administrator')) { show_admin_bar(false); }

    /

    show_admin_bar(false);
    if (!current_user_can('manage_options') ) { show_admin_bar(false); }

  6. keesiemeijer
    moderator
    Posted 3 years ago #

    Try one of the two.

  7. watchersnplayers
    Member
    Posted 3 years ago #

    Can you please Check my Code because its not working
    The tool bar is not showing for me (Administrator )

  8. keesiemeijer
    moderator
    Posted 3 years ago #

    Try this one in functions.php :
    if (!current_user_can('manage_options') ) { show_admin_bar(false); }

  9. watchersnplayers
    Member
    Posted 3 years ago #

    I had used like this and it not working.

    "show_admin_bar(false);
    if (!current_user_can('manage_options') ) { show_admin_bar(false); } "

    and its still hiding the tool bar for me :(

  10. keesiemeijer
    moderator
    Posted 3 years ago #

    not:

    show_admin_bar(false);
    if (!current_user_can('manage_options') ) { show_admin_bar(false); }

    but only:

    if (!current_user_can('manage_options') ) { show_admin_bar(false); }
  11. watchersnplayers
    Member
    Posted 3 years ago #

    that Worked Great :)

    thanks

    GREAT job :)

  12. keesiemeijer
    moderator
    Posted 3 years ago #

    You're welcome. I'm glad you got it resolved.

Topic Closed

This topic has been closed to new replies.

About this Topic