Remove WordPress Admin Bar?CSS

不言
リリース: 2018-05-16 15:58:36
オリジナル
1291 人が閲覧しました

Read the full article at: Remove WordPress Admin BarCSS A version or two back, WordPress decided to add a toolbar for logged in users on the display side thats about the sites theme. ?I get why they did it but its an annoyance to me I dont

Read the full article at:  Remove WordPress Admin Bar CSS

Treehouse
Wufoo

A version or two back, WordPress decided to add a toolbar for logged in users on the display side that’s about the site’s theme. ?I get why they did it but it’s an annoyance to me — I don’t care to see it. ?To accomplish this task, WordPress injects the following into?every page:

#wpadminbar { display:none; }
	html { margin-top: 32px !important; }
	* html body { margin-top: 32px !important; }
	@media screen and ( max-width: 782px ) {
		html { margin-top: 46px !important; }
		* html body { margin-top: 46px !important; }
	}
ログイン後にコピー

Bleh. ?You can remove this CSS and the admin bar using the following code which should be placed with your functions.php file:

add_action('get_header', 'remove_admin_login_header');
function remove_admin_login_header() {
	remove_action('wp_head', '_admin_bar_bump_cb');
}
ログイン後にコピー

Use it. ?You’re welcome.

関連ラベル:
ソース:php.cn
このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
最新の問題
人気のおすすめ
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!