You've already forked wp-bootstrap
feat: offcanvas mobile navigation with user avatar and admin bar fix (v1.0.11)
Switch mobile nav from collapse to offcanvas, add logged-in user avatar and My Account link to offcanvas header, move dark mode toggle to offcanvas footer. Fix admin bar overlapping offcanvas via inline CSS. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -83,6 +83,13 @@ if ( ! function_exists( 'wp_bootstrap_enqueue_scripts' ) ) :
|
||||
$theme_version
|
||||
);
|
||||
|
||||
// Push offcanvas below the WP admin bar when logged in.
|
||||
if ( is_admin_bar_showing() ) {
|
||||
wp_add_inline_style( 'wp-bootstrap-style',
|
||||
'.offcanvas { padding-top: var(--wp-admin--admin-bar--height, 32px); }'
|
||||
);
|
||||
}
|
||||
|
||||
// Enqueue Bootstrap JS bundle (includes Popper).
|
||||
wp_enqueue_script(
|
||||
'wp-bootstrap-js',
|
||||
|
||||
Reference in New Issue
Block a user