문제

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.)

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 wordpress.stackexchange
scroll top