• Hello WordPress users,

    Hopefully my query will be a rather easy one to answer, either way. I just upgraded to WordPress 3.3, and I’ve noticed the plugin I’ve been using to hide the admin bar on the public side of the site doesn’t work any longer.

    This led me to wonder if there is now an option in the long-awaited WordPress 3.3 that allows the blog owner to disable the admin bar publicly? I couldn’t find any, and that seemed strange in that I thought this would be a blindingly obvious feature to add in an updated version of WP. Any information about this problem (work-arounds, plugins, etc.), would be greatly appreciated.

Viewing 15 replies - 31 through 45 (of 62 total)
  • 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.

    @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.

    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'  );

    OK, the whole ‘freedom’ discussion is killing me!
    https://www.ads-software.com/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.

    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.

    Thread Starter MarcAdrian

    (@marcesadrian)

    @rev. Voodoo:

    The about section at https://www.ads-software.com/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.

    Thread Starter MarcAdrian

    (@marcesadrian)

    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: https://www.ads-software.com/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.

    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');

    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:

    https://www.ads-software.com/extend/plugins/wp-admin-bar-removal/

    in conjunction with my plugin One Click Logout Barless:

    https://www.ads-software.com/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!

    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.

    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.

    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');
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    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.

    Thread Starter MarcAdrian

    (@marcesadrian)

    @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 www.ads-software.com 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.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    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.

Viewing 15 replies - 31 through 45 (of 62 total)
  • The topic ‘Hiding admin bar in WordPress 3.3’ is closed to new replies.