Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] How to remove admin bar link to dashboard


  • 9087877
    Inactive

    How can this be accomplished so that only the admin has the dashboard link and not the subscribers. I am using wordpress 3.4.1 and buddypress 1.6 on a localhost for testing.

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

  • charlietech
    Participant

    @charlietech

    ‘add_filter(‘show_admin_bar’, ‘__return_false’);` in your functions.php file to turn off fully.

    Alternatively, you can use:

    ‘Settings > BuddyPress : Toolbar Show the Toolbar for logged out users’

    You can also select to show or hide the WordPress admin bar on your own profile.

    If none of those work for you then you may need to look see if your theme is forcing something.


    9087877
    Inactive

    @charlietech Thanks for the reply but that is not what I had in mind. Simply put I just don’t want regular users to ever be able to go to the dashboard just the admin has access to the dashboard. Is there some function that can accomplish removing this dashboard link from the admin bar for non administrators?


    mrjarbenne
    Participant

    @mrjarbenne

    In your theme’s functions.php file, add this code:

    `if (!current_user_can(‘manage_options’)) {
    add_filter(‘show_admin_bar’, ‘__return_false’);
    }`

    Can’t take the credit for this. Google is your friend:
    http://lmgtfy.com/?q=show+toolbar+to+admin+only


    govpatel
    Participant

    @govpatel

    Since I upgraded buddypress to 1.6 I do not have admin bar is there any setting I am missing to have admin bar when logged in


    9087877
    Inactive

    @mrjarbenne Thanks for the snippet! Its works perfectly!
    @govpatel You may want to start a new thread and include a link to your site and give a little more detail so someone is more able to help find a solution for your issue as yours is a totally different topic then what this thread was about.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] How to remove admin bar link to dashboard’ is closed to new replies.
Skip to toolbar