前言
wordpress默认的后台登陆界面是仪表盘,界面上有很多我们看到的新闻订阅,插件信息等,看着不怎么舒服,而且会拖慢后台打开速度。本次教程是通过在主题中添加代码的方式来实现移除不需要的模块。
使用方法
进入后台 【外观】-【编辑】找到模板函数functions.php
将以下代码复制粘贴到主题的functions.php文件中。
//自定义后台,移除不需要的widget
function remove_dashboard_widgets(){
global$wp_meta_boxes;
unset($wp_meta_boxes'dashboard''core');//插件
//unset($wp_meta_boxes'dashboard''core');//近期评论
unset($wp_meta_boxes'dashboard''core');//开发日志
unset($wp_meta_boxes'dashboard''core');//引入链接
// unset($wp_meta_boxes'dashboard''core');//概览
unset($wp_meta_boxes'dashboard''core'); //新闻
}
add_action('wp_dashboard_setup', 'remove_dashboard_widgets');
发现共鸣
Warning: curl_setopt() expects parameter 1 to be resource, null given in /www/wwwroot/blog.longshi.org/usr/themes/armx/functions.php on line 1531
如是说:节日的意义,就是用美好的方式消耗时间