Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Prevent Admin Bar from interfering with themes


beholdcreative
Member

@beholdcreative

fjrichman… I agree this is a problem. It would be one thing if BuddyPress only added the padding when the site visitor was logged in, but it’s poor form to add 25px pixels padding to the body regardless. I understand that it would be a problem for WordPress developers who don’t call body_class(), but, by default, the BuddyPress default stylesheet (adminbar.css) should specify its padding on body.logged-in, not on the generic body tag. In any case, that’s the easiest solution I know of. Just modify adminbar.css (most likely at /wp-content/plugins/buddypress/bp-themes/bp-default/_inc/css/adminbar.css) on the first line to body.logged-in. If for some reason you have themes that don’t or can’t call body_class(), you can use the is_user_logged_in function to override the BuddyPress styling. Something like: `body#mypage { padding: 0px; } `. Hope that helps, two months later.

Looking back at your question, I see that you were actually asking more generally to start about BuddyPress tweaking a design wether or not the user is logged in. Well, in that case it would be harder to have a one-size-fits-all solution. Sorry if I missed the thrust of your question, but this may be helpful to others.

Skip to toolbar