去掉 WordPress 3.1+版本顶部的admin bar管理工具
WordPress 3.1版本之后,为了方面WP用户,在博客首页、文章页、页面等顶部会默认显示一个admin bar,但并不是所有人都需要或喜欢这玩意(至少我是不喜欢的),还好可以去掉admin bar功能,隐藏wp admin bar有两种方法,一种是通过后台设置,一种是在functions.php文件添加隐藏代码。
wordpress 后台设置不显示wordpress admin bar
登陆博客后台,在“用户”选项卡下点击“我的个人资料”进入设置界面
在个人设置部分有个“显示管理工具栏”设置选项
可以设置“在浏览站点时”、“在控制面板中”,不想显示就去掉“在浏览站点时”前面的勾
保存即可
functions.php文件去掉wordpress管理工具栏的代码
1.在functions.php文件的之前添加以下代码
/隐藏admin Bar function hide_admin_bar($flag) { return false; } add_filter('show_admin_bar','hide_admin_bar');
Copy after login
2. 保存文件,更新页面,admin bar即消失。
PS:推荐第一种方法。
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article
Assassin's Creed Shadows: Seashell Riddle Solution
3 weeks ago
By DDD
What's New in Windows 11 KB5054979 & How to Fix Update Issues
2 weeks ago
By DDD
Where to find the Crane Control Keycard in Atomfall
3 weeks ago
By DDD
Saving in R.E.P.O. Explained (And Save Files)
1 months ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics
CakePHP Tutorial
1386
52

