Site logo

Archived topic

Multisite Shows Login Admin Bar On Two Sub-Domains

5 replies · Started by Mary Pearson on January 27, 2017

Viewing posts 1–6 of 6

Hi Tom,

OK here's another tough one. I don't ever want any of my users to see an admin bar. To that effect I have been given (by WPMU) several pieces of code to put in my child theme functions.php file. I've probably tried about 6. None of them stop the showing of Login Admin Bar on two of the sub-domains.
https://trans.christiangays.com/
https://intersex.christiangays.com/

The other five sites are all good - no Admin bar. What have I done differently for these two sites (I added them both at the same time) than what I've done with the others?

Thanks!

Thanks Tom. I have tried all of the suggestions on that page and a few more and nothing works. I must have something in those two websites that are preventing the code from working. I'll keep looking.

Finding lots of issues. It's not just the admin bar. I have a Global Site Search Widget that is showing up on all sites except intersex and trans.

I tried changing themes but trans and intersex won't change, even though I have deactivated generate press and have activated twenty-sixteen. I think there is a problem right in the heart of these two sites. I may have to delete them and reinstall.

Thanks again!

No problem, good luck!

WPMU found the problem:

The problem we were running into is you had installed WP Rocket on your primary domain and it was having an effect on your subsites as well. After clearing the cache the changes I've made to get rid of the admin bar have taken effect. Also, global search started displaying.

functions.php used

// Hide Admin Bar for All Users Except Adminministrators
if ( !current_user_can( 'manage_options' ) || !is_user_logged_in() ) {
add_filter('show_admin_bar', '__return_false', 99999);
}

Great to hear :)

This archived topic is closed to new replies.