博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
隐藏wordpress后台_在WordPress中隐藏管理栏
阅读量:2514 次
发布时间:2019-05-11

本文共 650 字,大约阅读时间需要 2 分钟。

隐藏wordpress后台

WordPress automatically injects an admin toolbar at the top of the page for logged in users.  This bar is really an annoyance to me because it slightly throws off my theme design and I never need the toolbar for anything.  Here's a snippet of code which will prevent that toolbar from displaying:

WordPress会在页面顶部自动为登录用户注入一个管理工具栏。 这个栏对我来说真的很烦,因为它稍微有点偏离我的主题设计,而且我从不需要工具栏了。 这是一段代码,将阻止该工具栏显示:

add_filter('show_admin_bar', '__return_false');

Now I don't need to hide this toolbar with CSS and my layout can look as it should. I love WordPress' filtering/hook system!

现在,我不需要使用CSS隐藏该工具栏,并且布局可以看起来像应该的那样。 我喜欢WordPress的过滤/挂钩系统!

翻译自:

隐藏wordpress后台

转载地址:http://sfvwd.baihongyu.com/

你可能感兴趣的文章
org.apache.jasper.JasperException: Unable to compile class for JSP
查看>>
centos中的配置文件 分类: B3_LINUX ...
查看>>
1.找两个数下标Two Sum
查看>>
牛客~~wannafly挑战赛19~A 队列
查看>>
MYSQL GTID使用运维介绍(转)
查看>>
5 -- Hibernate的基本用法 --2 2 Hibernate的数据库操作
查看>>
RAID
查看>>
Jquery.Sorttable 桌面拖拽自定义
查看>>
PSP
查看>>
身份证的最准确的正则表达式,绝对让你吃惊啊!
查看>>
14.python读写Excel
查看>>
MySQL备份类别
查看>>
JNI数据类型(转)
查看>>
mysql 主从数据同步
查看>>
ContentType的一些值
查看>>
哈希表
查看>>
Codeforces 1174C Ehab and a Special Coloring Problem
查看>>
java并发编程基础 --- 4.1线程简介
查看>>
LeetCode "Word Search"
查看>>
LintCode "Maximum Subarray Difference"
查看>>