- This topic has 5 replies, 2 voices, and was last updated 5 years, 3 months ago by
Tom.
-
AuthorPosts
-
January 27, 2017 at 8:17 pm #270149
Mary Pearson
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!
GeneratePress 1.3.43GP Premium 1.2.94January 27, 2017 at 8:33 pm #270152Tom
Lead DeveloperLead DeveloperHmm, afraid I can’t really help with this one.
Maybe this will help?: http://www.wpbeginner.com/wp-tutorials/how-to-disable-wordpress-admin-bar-for-all-users-except-administrators/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJanuary 28, 2017 at 11:01 am #270671Mary Pearson
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!
January 28, 2017 at 7:39 pm #270943Tom
Lead DeveloperLead DeveloperNo problem, good luck!
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJanuary 28, 2017 at 7:42 pm #270945Mary Pearson
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);
}January 28, 2017 at 7:46 pm #270949Tom
Lead DeveloperLead DeveloperGreat to hear 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.