WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Hiding admin bar in WordPress 3.3 (63 posts)

  1. lilqhgal
    Member
    Posted 2 years ago #

    I feel the same way. As a custom theme designer, who uses WP as a CMS for her clients, I generally build a custom link/dashboard system for my clients. They don't want access to all that extra "stuff"; it confuses them, and makes my job twice as hard. I agree it should be a simple OPTION with the ability (thru hooks and/or filters) to add-on and remove things from it. WP talks about "Freedoms" but yet they're forcing our hand here. Just my $0.02.

  2. consumedesign
    Member
    Posted 2 years ago #

    For now I'm using the CSS until something gets worked out. I have a client who has their people log in and post stuff, currently if I don't hide it via CSS then they can post to other areas that I removed from the menu using admin_menu.

  3. lilqhgal
    Member
    Posted 2 years ago #

    @consumedesign - Where are you putting it? I added it in my active theme stylesheet, even added "!important" for each style, but the adminbar still shows up in the Dashboard.

  4. consumedesign
    Member
    Posted 2 years ago #

    can do like so in your functions.php file:

    function hide_cats() {
    	$hide_cats = "<style type=\"text/css\">
    	#wpadminbar
    	{ display: none; visibility: hidden; }
    	</style>";
    	print($hide_cats);
    }
    add_action( 'admin_head', 'hide_cats'  );
  5. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    OK, the whole 'freedom' discussion is killing me!
    http://wordpress.org/about/philosophy/

    Seriously.

    The freedom to run the program, for any purpose.
    The freedom to study how the program works, and change it to make it do what you wish.
    The freedom to redistribute.
    The freedom to distribute copies of your modified versions to others.

    Nowhere in there does it say WordPress guarantees the freedom to have the option to turn everything on and off provided for you, or to have the freedom to have your personal whims catered to.

    Unhappy with the toolbar? that's cool, express that. But in no way is WordPress infringing on your freedom by developing what is felt to be a useful feature for the majority of users.

    That is just sticking with the philosophy.

  6. Nevis-1
    Member
    Posted 2 years ago #

    So there is no simple way to disable this ****? Back to the eralier version. Glad I found this out on a new site before I screwed the rest of my sites. BTW, has Micro$oft purchased WP? They are infamous for making you learn how to drive all over again.

    Moderators note: No swearing on the forum, we're not an adult only community.

  7. MarcEsadrian
    Member
    Posted 2 years ago #

    @Rev. Voodoo:

    The about section at http://wordpress.org/about/philosophy/ also says the following:

    It's our duty as developers to make smart design decisions and avoid putting the weight of technical choices on our end users.

    We want to make WordPress easier to use with every single release.

    I personally feel not having on-board control over the tool bar is counter to the above mission statements, and judging by other comments here, I'm apparently not alone. It's not about "personal whims being catered to." It's about good sense. It's about freeing designers and authors from needlessly wallowing in code, so they can get back to making great WordPress blogs.

  8. MarcEsadrian
    Member
    Posted 2 years ago #

    For those who would like to know, I found another plug-in that disables the admin bar/tool bar. Though it was originally created for WP 3.1 and 3.2, a future 2012 release for 3.3 is apparently in the works: http://wordpress.org/extend/plugins/wp-admin-bar-removal/

    The plugin as it currently is works in removing the bar on both front and back end—not necessarily what I particularly needed (I wanted to keep it on the back end), but it's the closest thing to a solution without getting into custom php.

  9. jsalo
    Member
    Posted 2 years ago #

    For those who do not want the users on their multi-site to get confused about the intricacies of upgrading wordpress can hide that particular menu doing the following. You can still as the network administrator see it. Put this in your theme's functions.php or some other appropriate plae where it is runs early enough.

    function fix_admin_bar() {
            global $wp_admin_bar;
            if (!is_super_admin())
                    $wp_admin_bar->remove_node('wp-logo');
    
    }
    add_action('wp_before_admin_bar_render', 'fix_admin_bar');
  10. olyma
    Member
    Posted 2 years ago #

    If you wish to completely disable the admin bar in the Dashboard and have 3.3 work --- you can use sLa's Admin Bar Removal plugin:

    http://wordpress.org/extend/plugins/wp-admin-bar-removal/

    in conjunction with my plugin One Click Logout Barless:

    http://wordpress.org/extend/plugins/one-click-logout-barless/

    Installed together in 3.3, they get rid of the admin bar AND allow logout, and when multisite is installed -- my plugin allows multisite navigation, too.

    Cheers!

  11. acizna_p
    Member
    Posted 2 years ago #

    I feel the same way. As a custom theme designer, who uses WP as a CMS for her clients, I generally build a custom link/dashboard system for my clients. They don't want access to all that extra "stuff"; it confuses them, and makes my job twice as hard. I agree it should be a simple OPTION with the ability (thru hooks and/or filters) to add-on and remove things from it.

    I agree absolutely with lighgal. Providing flexibility, convenience, and less confusion for your entire user base (including their clients) and not just the select majority is the professional (and often quite profitable) way to go about things. This service-oriented practice has certainly worked wonders for my firm.

    Thanks for the tip, olyma. I'll give it a try although I still believe that issue should be addressed by WordPress itself rather than forcing product users to find a third-party workaround. I, too, would really like to see the ability to globally disable the tool bar on the front end from within the dashboard.

  12. olyma
    Member
    Posted 2 years ago #

    As Ipstenu often says: "it's the way WP is headed." I personally do see such philosophy as quite extremely insensitive of the dev core folks --- but in spite of this, the WP backend is designed to be pliable!!!! :) So as much as core dev folks may do things one doesn't like, there will always be someone who'll write a plugin to fix it.

  13. jpmclaughlin
    Member
    Posted 2 years ago #

    Taking jsalo's code a little further, you can easily remove any of the nodes in the toolbar:

    function custom_admin_bar() {
    	global $wp_admin_bar;
    	if ( !current_user_can( 'install_themes' ) ) {
    		$wp_admin_bar->remove_node( 'wp-logo' );
    			// or individually remove its children
    			// $wp_admin_bar->remove_node( 'about' );
    			// $wp_admin_bar->remove_node( 'wporg' );
    			// $wp_admin_bar->remove_node( 'documentation' );
    			// $wp_admin_bar->remove_node( 'support-forums' );
    			// $wp_admin_bar->remove_node( 'feedback' );
    		$wp_admin_bar->remove_node( 'site-name' );
    		$wp_admin_bar->remove_node( 'comments' );
    		$wp_admin_bar->remove_node( 'new-content' );
    			// or individually remove its children
    			// $wp_admin_bar->remove_node( 'new-post' );
    			// $wp_admin_bar->remove_node( 'new-media' );
    			// $wp_admin_bar->remove_node( 'new-link' );
    			// $wp_admin_bar->remove_node( 'new-page' );
    	}
    }
    add_action('wp_before_admin_bar_render', 'custom_admin_bar');
  14. jpmclaughlin - And that is, has been, and will be the preferred, suggested way to handle this. Remove what you don't want, works great :) I use it for people all the time.

    jsalo - That code also is exactly the right thing. Don't want it on the front end? There you go.

    olyma - I'm not a core dev. I don't work for Automattic. I'm a volunteer mod and novice trac submitter :) The only reason you hear me saying that so often is that I was interested in the why and wherefor of the decisions, and decided that I should start paying attention more closely. Which is how I learned things like Jane didn't want the toolbar, but now she likes it.

  15. MarcEsadrian
    Member
    Posted 2 years ago #

    @Ipstenu:

    "And that is, has been, and will be the preferred, suggested way to handle this."

    Well I think that attitude isn't quite in the spirit of making WordPress "easier to use with each release." It's not like the above code patches, while no doubt functional across all blog configurations (I'm assuming so), are easily stumbled upon for a novice user; he or she would have to do some digging to arrive upon this solution, and then may not be entirely sure how to implement it.

    While I myself have no trouble adding this code to functions.php, I sense a little intellectual dishonesty (I assume unintended) going on here with savvy users weighing in to essentially say the bar fix is "easy" by...adding code. Surely, this is more complicated than having the ability to disable the bar built-in to the core itself for users who don't want to spend the next hour or two on wordpress.org for a code patch or plugin that will do the trick.

    Bottom line? You either make things easy or you don't for novice/average users who want some level of customization on their blogs, which will no doubt involve taking away a company logo on the upper left-hand side of the screen.

  16. Bottom line? You either make things easy or you don't for novice/average users who want some level of customization on their blogs, which will no doubt involve taking away a company logo on the upper left-hand side of the screen.

    I don't disagree to this at all.

    But I come at it from the other end. I don't think novice users, who don't understand how code works, should be removing those things.

    WordPress walks a fine line, trying to balance 'decisions, not options' with making it 'easier to use with each release.' And I get the impression they feel that 'more options' is not easier. I tend to agree. The more options people have, the more likely they are to hurt themselves. Leave the 'advanced' options to people who understand what they're doing, or like many of us did, start becoming an advanced user.

    I think that customizing the toolbar will always be an advanced skill. And I think it should be. Why? Because you, the advanced user, knows 'If I disable this, I lose functionality, but I can recreate that...' And you also know where to find all the things you need. A novice doesn't know where everything is on WP yet, if they ever do, so having a handy toolbar up there, like Google, Facebook and a bunch of other sites have, is common place. They know what THAT is.

    Anyway, I say 'This is the way WP is going.' becuase that's what I've been told. Liking it is never my point. Accepting it and either learning how to change it, or learning to live with it, IS my point :) This is the wonderful, free, tool someone gave me. I can do what I want with it, or hire someone to do it, or a hundred other things. But WP gave me the ability to grow from that novice to the expert I am. And that's because sometimes they do things I don't like, or want. And that's really cool.

  17. Christiann
    Member
    Posted 2 years ago #

    Here's my solution:

    /* trash the user admin bar on public site on registration */
    add_action('user_register','trash_public_admin_bar');
    function trash_public_admin_bar($user_ID) {
    	update_user_meta( $user_ID, 'show_admin_bar_front', 'false' );
    }

    I added this to my functions.php. Now new users will not have the admin bar by default. If they want it, they can turn it back on.

    I don't have to do this in my case, but you could also turn every user's admin bar off in the database by running this query:

    update wp_usermeta set meta_value = 'false' where meta_key = 'show_admin_bar_front'

  18. MarcEsadrian
    Member
    Posted 2 years ago #

    I don't think novice users, who don't understand how code works, should be removing those things.

    But they may very well understand the universal idea of plugins fairly well, which could (and do) take over the basic roles of login/logout without getting too much into code, if ever. It's perfectly feasible that a user, once he's taken a day or two to familiarize himself with his blog and different themes he can use, won't dig the ever-present corporate logo right at the top of his page, or the accompanying gray bar. I also mentioned average users, too, who are more apt to desire more control over the look and feel of their blogs. Such users may not know how to disable this hard feature without doing some particular homework. Thankfully, there are plugins available to disable the bar for those who don't want to edit support files, though they are sometimes a little tricky to find.

    WordPress walks a fine line, trying to balance 'decisions, not options' with making it 'easier to use with each release.' And I get the impression they feel that 'more options' is not easier. I tend to agree.

    Not surprisingly, I don't agree—in all circumstances. I generally prefer having more options with most things in life, not less. Nonetheless, in some cases, less choices are indeed preferred, which is why it's common for software to have "advanced user settings," if so desired. It would be perhaps a good thing to see that implemented. That way there, the tool bar stays, but can be eliminated elegantly, if sought.

    I think that customizing the toolbar will always be an advanced skill. And I think it should be. Why? Because you, the advanced user, knows 'If I disable this, I lose functionality, but I can recreate that...'

    I generally agree, and with many aspects of WordPress, I think that's a perfectly reasonable way of thinking. We should keep in mind, however, that it was this tightrope act of "balancing decisions with options" that led to creating the admin bar in the first place, which now certainly results in lost functionality, if disabled. Leaving it in place often lends toward redundant functionality, too, depending upon chosen theme and preexisting design schemas, which also can be a little confusing, for both user and admin, I might add.

    Anyway, I say 'This is the way WP is going.' becuase that's what I've been told. Liking it is never my point. Accepting it and either learning how to change it, or learning to live with it, IS my point :).

    I think I understand you better now. When you wrote, "And that is, has been, and will be the preferred, suggested way to handle this," it sounded like you were speaking from a point of authority on the subject, as if to know what is preferred and suggested.

    That aside, there is of course a third option, which is to voice concern over a feature that is causing trouble in the trenches. I absolutely love WordPress and I encourage its development. I don't believe WordPress can possibly handle all user desires, but I do, however, have some opinions about its direction in regard to certain additions, the "toolbar" being one of them, since 3.0.

  19. acizna_p
    Member
    Posted 2 years ago #

    "Here's my solution:..."

    Nice, xiann! I'm going to try that. :-)

    "But they may very well understand the universal idea of plugins fairly well, which could (and do) take over the basic roles of login/logout without getting too much into code, if ever. It's perfectly feasible that a user, once he's taken a day or two to familiarize himself with his blog and different themes he can use, won't dig the ever-present corporate logo right at the top of his page, or the accompanying gray bar."

    This last sentence describes me to a T. Look, feel, and design are absolutely essential to me on any piece of communications work that I do and taking away my control over that (unless I'm also a programmer and can hack code) does not in any way make my life simpler, because, no matter what, whatever my level of knowledge, I WILL find a way to get rid of that dog in my rosewater, come hell or high water. In this case that mean, that simply because I don't understand code, I must spend countless hours looking for a third-party solution when all I needed was a one-click option to turn the darn thing off.

    Making that way ridiculously hard, as WordPress has done with the admin bar, spawns anger and frustration, because, since I will not compromise the look and feel of my works due to some ill-thought decision on the number of options those "poor moronic average users" can bear, I must waste hours researching and testing a third-party solution, rather than doing the creative development work I'd much rather be doing. In case WordPress has not noticed, this is not making my life "easier." It's unnecessarily limiting my options, frustrating me, and making me determined to find a workaround, even if it takes weeks or months.

    If WordPress wants to keep its user base beyond the saavy few, they should not punish those of us who cannot code by forcing us to put up with "features" that are ugly, redundant, and potentially very confusing to our users, on the arrogant assumption that non-coders will put up with such junk.

      We won't
    . But we WILL resent every moment of time that we could have spent doing some constructive development and creating but instead had to spend digging up our own solutions to development eyesores or confusing design.

    And we will not forget this when it comes time to evaluate other solutions and present our recommendations to those considering adopting such a platform on a much wider basis.
    For what it's worth, this is the first feature that I've personally felt a need to speak up about. I don't typically go buzzing about the Internet complaining about the various defects the products I use; I'm far too busy using them (or quietly finding ways around the rocks they strew in my path). But when something brings me to a complete standstill, when I know that something is so inefficient or ugly or redundant that it HAS to go, when it would be no skin off the provider's back to provide an easy solution, and they still will not do it, I begin to distrust the direction and policies of the provider.

  20. jpmclaughlin
    Member
    Posted 2 years ago #

    While I certainly think everyone is entitled to his/her opinion, some of the complaints in this thread seem a little harsh and, dare I say, narrow-minded.

    Consider some users NOT in your shoes, who may have looked at toolbar trends (Google+, Twitter, etc.) and said "Gee, I sure wish WordPress provided a persistent toolbar for my users."

    So WordPress tossed the idea around and ran it through whatever process green-lights new features until it passed muster.

    But like any widely used platform/app, you simply can't please everyone. Some users won't like the new features. And they should absolutely feel free to voice their complaints.

    However, I feel that adopting a "how dare they" attitude takes it a little too far and seems naive at best and disrespectful at worst.

  21. MarcEsadrian
    Member
    Posted 2 years ago #

    Consider some users NOT in your shoes, who may have looked at toolbar trends (Google+, Twitter, etc.) and said "Gee, I sure wish WordPress provided a persistent toolbar for my users."

    Don't get me wrong, jpmclaughlin: I think the tool bar is a really great idea for just the reason you cite, and it should stay as a general feature right out of the box. I think the ability to turn it off should be made easily available, however, because WordPress isn't Twitter and it isn't Google or Facebook.

    I've said just about all I've had to say on this subject. I thank everyone for the dialog, both for and against.

  22. vtxyzzy
    Member
    Posted 2 years ago #

    One more reason to have the option to turn off the admin bar:

    I recently was asked to help out on a site that was not working correctly. Turns out that, on the Admin panel, there was a warning message that was being obscured by the Admin bar.

    I only found the message by looking at the source code for the page.

  23. lonniea
    Member
    Posted 2 years ago #

    @MarcEsadrian - you aint the 1st person that yelped about this new admin toolbar issue. We got your point though many furlongs ago.
    @jpmclaughlin - lol - good show old chap.
    @Rev Voodoo - I told you there would be spanking.
    @Ipstenu - You're a real cool dude my man. I like that Elf.
    @all others - yea... it's like they've step on our toes and standing in our face and we must live with it.

    personally the toolbar is fine for novices - but myself and i can imagation countless others disagree with the supposedbly 'ease of use' protocol. although i dislike the bar, i have deep respect for wordpress and have passed this message to my current blog trainees. I have not heard a Hooray from my newbies yet about it though.

    i really like the menu dropdown feature. as for the new 'featured pointer' popup; i have fear of mini popup wars in the future between plugin developers trying everything to get our attention. and i certainly do not want any more annoyance within wp-admin. this has yet to prove itself as ideal.

    that's how i feel about it anyway.

  24. MarcEsadrian
    Member
    Posted 2 years ago #

    @lonniea:

    "Ipstenu - You're a real cool dude my man. I like that Elf."

    I believe Ipstenu is a woman. But I'll quite my yelpin'. ;-)

  25. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    as for the new 'featured pointer' popup; i have fear of mini popup wars in the future between plugin developers trying everything to get our attention.

    That is definitely a concern shared by many, core devs included, from what I've read

  26. Oh yeah. :/

    A LOT of folks are skittish about those popups. Thankfully if you add this to your functions.php:

    remove_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );

    They ALL go away. Not the best fix, but some of us don't need it.

  27. Christiann
    Member
    Posted 2 years ago #

    I recently enacted my "No Admin Bar" suggestions above, which involve using your users' preferences to remove the admin bar instead of hacking it out of the CSS/XHTML, in a plugin. It's called Clean Admin Bar Removal and is in the WordPress Plugin Directory here: http://wordpress.org/extend/plugins/clean-admin-bar-removal/

  28. Claverhouse
    Member
    Posted 2 years ago #

    I just feel sorry for entirely new users who will install WordPress and not know there was ever a time when this unspeakable bar wasn't always there and therefore have no idea about restoring to a cleaner bar-less look.

    Much like being born after a social revolution, the new regime born in blood seems just naturally and peacefully there.

    @jpmclaughlin

    Consider some users NOT in your shoes, who may have looked at toolbar trends (Google+, Twitter, etc.) and said "Gee, I sure wish WordPress provided a persistent toolbar for my users."

    Considering the rules to NoScript & AdBlockPlus I had to add to disable all those foul social network bars ( notably those horrors that slide down the page as you scroll, following you sedulously ... Although there's another special place in Hell for the makers of 'slide-in' bars ) I'm gonna doubt the world needs more social networking bars.

  29. wadams92101
    Member
    Posted 2 years ago #

    Thank you @jsalo, that was the solution I've been looking for since 3.3 came out! Thanks also to @jpmclaughlin, and others that shared their coding solutions!

  30. wholmes
    Member
    Posted 2 years ago #

    Lot's of good points have been made so I won't reiterate. But I want my voice to count so...

    I agree with all who oppose this move by WP. I immediately upon updating saw that this was a big issue for me so I tried all the tricks and eventually got rid of the bar.

    So much more to say, but I just don't think anyone at Automattic is listening anyway.

    BTW; adding this to the CSS get's rid of the white space above your Ozh Menu when you are using CSS to hide the bar.

    body.admin-bar #wpcontent, body.admin-bar #adminmenu {
      padding-top:0;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic