后端支持信息

时间:2017-10-20 作者:jinxo

是否可以在后端显示支持信息框?例如,对于特定用户?比如邮件、电话号码等等?类似于“欢迎使用WordPress!”盒

1 个回复
SO网友:Randomer11

查看自定义仪表板小部件的用法:

https://codex.wordpress.org/Dashboard_Widgets_API

https://codex.wordpress.org/Function_Reference/wp_add_dashboard_widget

http://www.wpbeginner.com/wp-themes/how-to-add-custom-dashboard-widgets-in-wordpress/

http://wpengineer.com/307/add-wordpress-dashboard-widgets/

我已经包含了您需要从参考链接第三链接复制的代码,该链接将允许您添加自定义仪表板小部件。

将此添加到您的函数中。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\', \'Theme Support\', \'custom_dashboard_help\');
}

function custom_dashboard_help() {
echo \'<p>Welcome to Custom Blog Theme! Need help? Contact the developer <a href="mailto:[email protected]">here</a>. For WordPress Tutorials visit: <a href="http://www.wpbeginner.com" target="_blank">WPBeginner</a></p>\';
}

结束

相关推荐

Virtual Pages plugins

我很难让插件正常工作Virtual Pages (WordPress插件可简化虚拟页面的创建)我确实进行了编辑,根据查询创建了一个循环。add_action( \'gm_virtual_pages\', function( $controller ) { /* Creating virtuals pages for companies */ $args = array( \'post_type\' => array(\'companies\',), \'post_status\'