Hide upgrade site in admin bar on certain sites without upgrading it.

Is there a way of hiding the upgrade site in the admin bar without actually removing it network wide.

Basically i have a number of sites of my own that members can see the upgrade site in admin bar.

If i upgrade that site it still shows the “my account” button to all users. Obvously i can hide it network wide however i would like to retain this.

Is there a way to remove this button from particular sites only?


  • aecnu
    • WP Unicorn

    Greetings Ashley Keable,

    Thank you for this great question and other then upgrading the particular site to the point where there are not any further upgrades and therefore this should not show – then no there is no way i can think of to hide it on an individual site basis.

    Cheers, Joe

  • aecnu
    • WP Unicorn

    Greetings Ashley Keable,

    Surely there must be a way i can diable it them 2 blogs.

    Not that I am aware of as I had mentioned before, not for just those two blogs.

    But since you believe there is still, I shall go ahead and refer this to a higher authority for final resolution and say on this topic the WPMU Dev lead developer @aaron.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

    PS: I will also answer that other ticket.

  • Alexander
    • DEV MAN’s Mascot

    I’ve done this for another plugin. You might be able to use this:

    function filter_prosites_admin_bar() {
    global $wp_admin_bar;
    if ( current_user_can('hide_prosites_admin_bar') ){
    add_action( 'wp_before_admin_bar_render', 'filter_prosites_admin_bar' );

    You would need to use a role / capability plugin like User Role Editor or Role Scoper to create the new capability “hide_prosites_admin_bar”, which you would then apply to the users you would like as exceptions.

    Just a heads up, I haven’t tested that code. I made it for something similar I was doing with another plugin and just tweaked it to post here.

  • Ashley Keable
    • The Incredible Code Injector


    Thanks for everyones comments they are greatly appreciated.

    I am not an expert at coding so not quite sure where i add these codes. If worst comes to worst i will simply remove that menu completely however i would prefer it to stay as it should improve conversions.

    I would prefer not to do it with the role scope plugin method as its an additional plugin i would have to install.

    Please can someone explain where i put the code and what code to write, such as arons method for instance that doesn’t seem to require a plugin.

    Thanks all

  • Ashley Keable
    • The Incredible Code Injector

    I was having this issue as a result of tring to run 3 main sites within 1 multsite.

    However i have decided to create 3 miultisites due a long list of issues created with using the other method.

    Therefore whilst i never fixed this issue it no longer is an issue if that makes sence :slight_smile:

    Thanks for the help everyone

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.