如果想在WordPress仪表盘中添加一个自定义的模块,那么如何在WordPress仪表盘中添加自定义模块?可以将下面代码添加到当前主题函数模板functions.php中:

add_action(\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’wp_dashboard_setup\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’, \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’my_custom_dashboard_widgets\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’);

function my_custom_dashboard_widgets() {

global $wp_meta_boxes;

wp_add_dashboard_widget(\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’custom_help_widget\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’, \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’自定义\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’, \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’custom_dashboard_help\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’);

}

function custom_dashboard_help() {

echo \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'<p>自定义内容</p>\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’;

}

相关新闻

发表评论

您的电子邮箱地址不会被公开。

联系我们

联系我们

151-1101-0018

在线咨询:
邮件:30115776@qq.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信
关注微信
分享本页
返回顶部