Hide admin bar by user role and/or screen size media query
-
Hello,
I’m getting into a bit of a mess with:
- Hiding the admin bar by user role – including custom ones created using permissions pro;
- Hiding the admin bar by media query (and not leaving the white space behind!);
- Media queries themselves and appropriate breakpoints for mobile landscape & portrait and tablet landscape & portrait (one of the things I am looking to do is to hide the toolbar on a mobile landscape version of a user logged in to the front-end.
Crucially, I don’t want to lock down the access, just hide the view of it. I am using Elementor Pro but I would politely encourage you to stop and think twice before suggesting this post is in the wrong forum because, essentially, it is WordPress core functionality that I am trying to target (allbeit that I am trying to put the rules into Elementor’s Site Settings custom css area.
I have tried applying:
html #wpadminbar {
margin-top: 0rem !important;
display: none;
}or
head { margin-top: 0;
}and no joy with either.
Also, noticeably, the breakpoints currently in place affect both portrait and landscape view on mobiles. I was trying to hide the WordPress toolbar on mobile landscape view, and, for further reference, with and without being defined by the user role logged in.
Thanks ever so much for your time regardless of if you can help ??
- This topic was modified 8 months, 1 week ago by .
- This topic was modified 8 months, 1 week ago by .
- This topic was modified 8 months, 1 week ago by .
The page I need help with: [log in to see the link]
- The topic ‘Hide admin bar by user role and/or screen size media query’ is closed to new replies.