duanjie1339 2011-07-11 22:26
浏览 12
已采纳

在Wordpress Admin中编辑RIGHT NOW仪表板的元素

I'm customizing the Wordpress Admin site to suite my needs and there are several things I want to remove and customize (menus, etc...).

I noticed on the DashBoard section called 'Right Now' there are several things I don't need there. For instance the CHANGE THEME button and the wordpress version and theme. I found in the source dashboard.php where these are rendered, but rather than edit the source, can I just make a function that intercepts and changes this so it doesn't render them?

I also want to remove the DISCUSSION section and some of the counts for CATEGORIES, TAGS, and PAGES.

Is there a way to go about this? Thank you!

  • 写回答

1条回答 默认 最新

  • dsdsm2016 2011-07-11 22:57
    关注

    Hmm I think I solved this myself, although I'm not sure correctly. Using firebug I was able to find the class names and element ID's of the version and CHANGE THEME button and the version and theme

    I added this code in my functions.php:

    function wpc_remove_admin_elements() {
        echo '<style type="text/css">
            .versions p {display:none !important;}
            .versions #wp-version-message {display:none !important;}
        </style>';
    }
    add_action('admin_head', 'wpc_remove_admin_elements');
    

    This added some styling in my header to hide these elements.

    Is there a more efficient way to do this or am I going to be ok? I still don't know how to hide some of the Content and Discussion counts in the RightNow dash.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)