Any wordpress developers with 4.9 and Bootstrap 4 experience?

Hi I’m currently learning about wordpress and I’m making my own custom theme currently. However once i’ve imported it now, the wp-admin bar seems to be on top and my sticky navbar and content, some of it at least, is hidden by the admin bar? I’ve tried many different things and can’t seem to get my content pushed down? Any suggestions?

Yeah it’s always been an issue, luckily there are a few things you can do from turning off the bar in your WP settings to removing it with a small line or two of code in your functions.php file:

That breaks down the two methods I mentioned plus some other neat things you can do to customize the bar itself.

You could technically add a top padding or margin to your website that’s the same pixel amount as the height of that bar (32px). As to where to add it, that depends on your html structure.

By the way, if you do disable the admin bar, I’d suggest keeping the dashboard open in one tab and your website display in another tab. Makes it a lot easier to jump back and forth to make changes/see updates since you won’t have WP’s navigation links any more (at least on your webpage view).

1 Like

Hey @Mortuie, I have a couple of ways I deal with this.

First way is if you go into wp-admin > Users > Your Profile you will see a checkbox near the top labelled Toolbar, this toggles the bar you are seeing across the top on or off while you are logged into the website.

Second way, the easy way I like, is to use a plugin to simply hide the bar while logged in unless you hover your mouse over the top of the page, and then the bar slides down into view. Leave the bar for a few seconds and it hides again.

Auto Hide Admin Bar