Notifications
Clear all

wpForo 1.x.x [Closed] Extra padding in admin bar area for any user other than admin

22 Posts
5 Users
11 Reactions
2,771 Views
Posts: 201
 fawp
Topic starter
(@fawp)
Reputable Member
Joined: 5 years ago

In this post I am showing what happens when all plugins are disabled:

 

01-1-all plugins inactive

Just to show no plugin is enabled

01-2-admin-adminbar visible

In the Twenty Twenty default theme you can see the admin bar, as expected for admin

01-3-testuser-adminbar visible

In the Twenty Twenty default theme you can also see the admin bar for a normal user (testuser)

Posts: 201
 fawp
Topic starter
(@fawp)
Reputable Member
Joined: 5 years ago

In this post I am showing what happens when all plugins except wpForo are disabled:

02-1-Only wpForo plugin active

Just to show wpForo is the only plugin that is enabled

02-2-admin-adminbar visible

Once again, in the Twenty Twenty default theme you can see the admin bar, as expected for admin

02-3-testuser-adminbar NOT visible

This is where things change: a user who is not admin, will see extra padding where the admin bar would be. This happens when "Show Admin Bar for Members" is set to No.

Posts: 201
 fawp
Topic starter
(@fawp)
Reputable Member
Joined: 5 years ago

@fredclown @danniee @tutrix

 

did any of you manage to solve this issue, or are you using a workaround?

 

Thanks

3 Replies
Tutrix
(@tutrix)
Joined: 4 years ago

Noble Member
Posts: 1354

@fawp

I remove the space with the code I posted on page 1

add_action('get_header', 'remove_admin_bar_weird_css');
function remove_admin_bar_weird_css() {
remove_action('wp_head', '_admin_bar_bump_cb');
}

and add it again when the admin bar is displayed with css

.logged-in.admin-bar {
margin-top: 32px;
}

and so everything is ok

 fawp
(@fawp)
Joined: 5 years ago

Reputable Member
Posts: 201

Thanks @tutrix - this is still a workaround though, isn't it?

 

I am trying to get to the bottom of whether this issue affects only specific situations or not.

 

The guys at wpForo seem to suggest this is a localized problem (meaning it does not affect everybody), although I pointed out I was not the only one with this issue.

 

You would still have the issue, if you hadn't added the extra code, would you?

Tutrix
(@tutrix)
Joined: 4 years ago

Noble Member
Posts: 1354

@fawp

this is a very old problem with Wordpress when the adminbar is hidden

you can find many similar questions over google search

most users or authors will not see it because they are working with the visible adminbar

I only saw it because I run several blogs and am also often logged in as testuser without the adminbar

Posts: 377
(@danniee)
Honorable Member
Joined: 5 years ago

Nope, did not solve this :/

Posts: 201
 fawp
Topic starter
(@fawp)
Reputable Member
Joined: 5 years ago
Posted by: @tutrix

this is a very old problem with Wordpress when the adminbar is hidden

But the adminbar is not hidden, that's my entire point. If you check this post above, you will see that WordPress itself behaves normally when all plugins are disabled.

But when you activate only wpForo, with the "Show Admin Bar for Members" set to No, that's when you notice the problem.

 

How do you explain it?

Thanks

1 Reply
Tutrix
(@tutrix)
Joined: 4 years ago

Noble Member
Posts: 1354

But the adminbar is not hidden, that's my entire point.

But when you activate only wpForo, with the "Show Admin Bar for Members" set to No, that's when you notice the problem.

"Show Admin Bar for Members" set to No = means the adminbar is hidden
and only by hidden Adminbar you see the now empty margin-top 32px 

and the 2 codes solve the problem

the first code remove the "margin-top 32px" so all is ok when the Adminbar is hidden
the second code add the margin-top 32px so all is ok when the Adminbar is visible

sorry, for me this is not a very big problem
i added the 2 codes and everything works fine

Page 2 / 3