最近访客
百度未收录

WordPress仪表盘怎么删除,移除仪表盘

WordPress仪表盘怎么删除,移除仪表盘-狐狸库

有些站长不知道如何删除WordPress仪表盘,其实方法很简单,只需要将下面的代码添加到您的当前主题的 functions.php 文件:

function disable_dashboard_widgets() {
    global $wp_meta_boxes;
    // wp..
    unset($wp_meta_boxes[\'dashboard\'][\'normal\'][\'core\'][\'dashboard_activity\']);
    unset($wp_meta_boxes[\'dashboard\'][\'normal\'][\'core\'][\'dashboard_right_now\']);
    unset($wp_meta_boxes[\'dashboard\'][\'normal\'][\'core\'][\'dashboard_recent_comments\']);
    unset($wp_meta_boxes[\'dashboard\'][\'normal\'][\'core\'][\'dashboard_incoming_links\']);
    unset($wp_meta_boxes[\'dashboard\'][\'normal\'][\'core\'][\'dashboard_plugins\']);
    unset($wp_meta_boxes[\'dashboard\'][\'side\'][\'core\'][\'dashboard_primary\']);
    unset($wp_meta_boxes[\'dashboard\'][\'side\'][\'core\'][\'dashboard_secondary\']);
    unset($wp_meta_boxes[\'dashboard\'][\'side\'][\'core\'][\'dashboard_quick_press\']);
    unset($wp_meta_boxes[\'dashboard\'][\'side\'][\'core\'][\'dashboard_recent_drafts\']);
}
add_action(\'wp_dashboard_setup\', \'disable_dashboard_widgets\', 999);

这样就可以移除仪表盘了。

温馨提示:本文最后更新于2022/10/20 04:21:32。若文章内容或图片失效,请留言联系站长反馈!
!
也想出现在这里? 联系我们
创意广告
© 版权声明
THE END
点赞0赞赏 分享
评论 抢沙发

请登录后发表评论

    请登录后查看评论内容