toolbar loses all content when logged out in mobile

I have a network setup, with buddypress. the admin bar/toolbar at the top, the content disappears when logged out, even though set up not to (and it shows in wider views, like in a kindle, it will show the login or register in landscape, but in portrait, it is gone.)

This makes it impossible for most mobile users to use the site, after spending so much time making sure things look ok in small screen modes (using mostly twentytwelve with a child theme, though some sites in the network don't)

I spent all day today trying to find answers for this, haven't found any that are useful to me.

Any help would be greatly appreciated. we're looking at the http://indyfestusa.com network here.

  • Michelle Shull

    Heya, Al!

    I've got some CSS for you right here:

    #wp-admin-bar-bp-login {
    display: block;
    padding-left: 3px;
    color: #fff;
    }
    
    #wp-admin-bar-bp-register {
    display: block;
    float: right;
    padding-right: 3px;
    color: #fff;
    }

    That gives you your login and register links in the admin bar. They're there, there's just something causing them to be hidden. Display: block got them both to show up for me. The links are true white with this CSS, you can change #fff to your color of choice.

    Hope this helps!

    Have a great weekend!

  • AIPman1

    Spent more time researching finally found this code snippet:

    #wp-admin-bar-root-default #wp-admin-bar-bp-login {
    	display: block;
    }

    that did work.

    Adding it via Jetpack CSS editor to all sites is a pain though. Good thing my network is still young and isn't up to 100 sites yet....I am assuming that the site templates system will add this to all new sites as they are created, will test that.

  • AIPman1

    Hmmm, I use child themes on the main hub sites, but was using the theme pack to make themes available to site owners...which - isn't a child-theme friendly thing. I think, perhaps, I will change that since no one is really using any of them yet anyway, all the sign ups have been for the comicpress theme option we set up. So...I think we'll just make additional themes something people can ask to set up, and we'll require the added child layer for such and make sure to ad the code to those. A bit more work than I wanted to do right now, but...ensuring a responsive access to logging in on cell phones is essential to our operations, as Indyfest is getting designed so people can use it walking around a comic book convention to learn more about creators.

  • AIPman1

    ARG - in the course of implementing the removal of all the unused templates, and installing 2 new child ones, then setting those as active for the sites...the LOGGED OUT admin bar disappeared (I didn't know until done because, I was logged in and it was showing fine, and does, even in small screen mode.)

    I have checked for the wp_footer () in the footers, tried adding the parent footers to the child theme folders in case they weren't queuing right, switched back to the parent theme to make sure it was still gone in logged out mode. Made sure the boxes are checked to show to non logged in users, AND to show in profile - Tried turning on debugging but, am confused by it (I don't understand the error it is showing.) I turned off a few plug ins that sounded like potential culprits in the debug (I've turned debugging off again for now).

    If anyone can suggest what might have made the admin bar disappear on front end when logged off...I'm in need of extra brains.

  • AIPman1

    AHA!!!!! I don't know how or why or who or what did it, but the membership 2 plugin's setting to hide admin bar from non admin people got turned on. Gonna have to send out a memo to my co-admins about changing settings I guess. At this time...I can say I have things pretty well set now.

    The only thing I can think of is if I could pick and choose better which nodes stay turned on in small screen mode. The code provided by Michelle above can be used to turn on the log in spot, the code I had can be used to turn EVERYTHING on.

    I am wondering how to figure out the names of other nodes that are in use so I can re-do the css in use to just show the custom menu, log in and register. I'll do some more research and report if I find anything pertinent.

  • AIPman1

    here's something useful: If you look at the Inspect Element view on your browser, it will tell you the names of the different nodes. So I went and found the name of my custom Site Organizer node. Then I used

    #wp-admin-bar-root-default #wp-admin-bar-mabs {
    	display: block;
    }

    and now it shows in small screens. boom. you can do that for any node of the admin bar that is not showing that you want to, but remember that if you have too many, they will bounce the content of the admin bar into a second line on the screen, that is not cover by the black bar background, and will be over regular page content.

    Now...last thing I am going to try to accomplish with the admin bar...the custom menu I added using the Branding plug-in....it's admin bar menu node is called #wp-admin-bar-ub_admin_bar_0 - however, it only displays when logged in. I am going to try to figure out what needs to be added to make it always appear, because the same code here that I am using to make the log in and site organizer appear in small screen, that show when not logged in, is not making that node show when not logged in. So there must be something telling it not to...I'll figure this out and report.

  • Michelle Shull

    Hey, Alpman!

    Check two places, footer.php and functions.php. There's a chance you added either a script (in the footer) or a function (in functions.php) that is hiding/showing this based on login status. I've left old scripts on my sites and they've driven me batty until I remembered to check for them.

    Good work here, my friend! You've earned a WP merit badge. :slight_smile:

  • AIPman1

    Howdy - just back from a big convention promoting my network to Indy publishers. People really seem to like the set up I'm developing, so big thanks to WPMUDEV cause it wouldn't be what it is without you. It's going to take me a bit to catch up and also get the next issue of our magazine done before I can get back into the code work...but I'll pick up here ASAP and thanks for the pointer to start with. And merit badge? Does his mean I'm in the club? Do I have to sell cookies now? I just know I'm gonna eat more than I sell.

  • AIPman1

    Ok, folks...in my continued search to make the best toolbar I can, I found this:

    https://wordpress.org/plugins/wp-symposium-toolbar/

    Now, it's not specifically designed for use with buddypress and such, but, I've tested it and it does not conflict with it either. I'm not about to change from buddypress so the rest of the symposium stuff, not interested in.

    However, I first disabled the toolbar add on in the branding plug in, then activated this, just to test it out. It is very comprehensive, flexible, and most importantly, it's custom menus stay visible at all times. It has just about everything you can imagine needing for customizing the toolbar. You can even set it so that there are network wide custom menus AND site specific ones...so you can offer your site owners the option of adding their own and having access to style it specific to their site.

    Works logged out and works on smallest of screens. Now if I can just get the Multisite Switcher menu to act as good as this (which, it does still show and work in conjunction with this, it just disappears in small mode, if I can figure out how this one handles the responsive appearance change and get it to work with the other, i'll be golden)

    Anyway, anyone who is interested in a REALLY GOOD admin bar editor, check this one out. If WPMU's can catch up to this feature-wise, function wise (it's not impacting my load time noticeably) I'd gladly switch back to it, just tossing this out for others cause it's doing good by me.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.