Where is admin bar supposed to appear?

Where in the page's HTML is the admin bar supposed to appear? On my blog it is added to the footer section, with the result being that there is a gap above it when viewing the blog on mobile phones. (The admin bar has position:absolute; at small resolutions, and so does the footer it's contained within.)

Topic admin-bar Wordpress

Category Web


It's supposed to be in the footer, and it's positioned with CSS. This is partly because at the time that it was introduced there wasn't a standard hook in themes for placing something at the very top of the page. Instead it is added to the wp_footer hook.

It's the theme's job to make sure it accounts for the presence of the admin bar, which it can do using the admin-bar body class that's added when the bar is present.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.