You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don't include any top margin to account for the admin bar on WordCamp sites and therefore the admin bar overlaps with the header. You can see that at https://asia.wordcamp.org/2025/.
I was thinking we could do something like:
/**
* Render CSS to adjust the top margin when the admin bar is present for logged-in users.
*/
function wcorg_admin_header_tweak_css() {
if ( is_user_logged_in() ) {
$admin_bar_height = 'var(--wp-admin--admin-bar--height, 0)';
?>
<style type="text/css">
html {
margin-top: <?php echo esc_attr( $admin_bar_height ); ?>;
}
</style>
<?php
}
}
add_action( 'wp_head', 'wcorg_admin_header_tweak_css' );
Note
It seems like some WordCamp sites have already shipped fixes so whatever we do here, we'll need to reach out to those organizers ahead of time.
Describe the bug
We don't include any top margin to account for the admin bar on WordCamp sites and therefore the admin bar overlaps with the header. You can see that at https://asia.wordcamp.org/2025/.
I was thinking we could do something like:
Note
It seems like some WordCamp sites have already shipped fixes so whatever we do here, we'll need to reach out to those organizers ahead of time.
@ryelle What are you thoughts about adding this to https://github.com/WordPress/wordcamp.org/blob/production/public_html/wp-content/mu-plugins/3-helpers-misc.php
The text was updated successfully, but these errors were encountered: