wordpress-bootstrap icon indicating copy to clipboard operation
wordpress-bootstrap copied to clipboard

Bootstrap navbar hides due to WordPress Admin Bar

Open rakeshtembhurne opened this issue 13 years ago • 12 comments

Logged in users does not see theme's navbar. Need a way to always display theme's navbar.

rakeshtembhurne avatar Mar 07 '12 15:03 rakeshtembhurne

The workaround is to move the admin bar to the bottom: http://wordpress.org/extend/plugins/stick-admin-bar-to-bottom/ (plugin) and http://wpengineer.com/2190/move-wordpress-admin-bar-to-the-bottom/ (code)

GerritKuilder avatar Mar 09 '12 06:03 GerritKuilder

You can try add

body.admin-bar .navbar { top: 28px }

to style.css

tobiasrobinson avatar Mar 27 '12 08:03 tobiasrobinson

this seems not work with Bootswatch

flyabroad avatar Apr 14 '12 23:04 flyabroad

you can go to Dashboard>users>admin(or whatever you are) and uncheck show toolbar when viewing site. It will only be around in the dashboard area

MrNagoo avatar Apr 25 '12 03:04 MrNagoo

Any thoughts on combining the two?

Realize that these come from two different layers of code, but a double nav bar is poor UI.

EliezerIsrael avatar May 23 '12 19:05 EliezerIsrael

Try this css, it fixed the issue for me.

.navbar-fixed-top { top: 0px; }
body.admin-bar .navbar-fixed-top { top: 28px !important; }

bassscape avatar Aug 08 '12 04:08 bassscape

bassscape; worked right away for my custom theme as well - thanks! :+1:

Hansaplast avatar Mar 02 '13 03:03 Hansaplast

didnt work for me... :-1:

oweibor avatar Mar 03 '13 15:03 oweibor

and dont forget to add this code on the body tag <body <?php body_class(); ?>>

raidenz avatar Jul 04 '13 12:07 raidenz

@bassscape worked for me too! ty

schurpf avatar Dec 23 '13 19:12 schurpf

@bassscape thank you it worked

ihabhamed avatar Feb 02 '15 06:02 ihabhamed

	<?php if (is_admin_bar_showing()): ?>
		<style>
			.fixed-top{
				top: 32px;
			}
		</style>
	<?php endif ?>

for bootstrap 4

mahmudinm avatar Oct 10 '18 06:10 mahmudinm