Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wordpress是否在用户配置文件仪表板上显示自定义USERMETA字段?_Wordpress_Customization_Profile_Dashboard_Custom Fields - Fatal编程技术网

Wordpress是否在用户配置文件仪表板上显示自定义USERMETA字段?

Wordpress是否在用户配置文件仪表板上显示自定义USERMETA字段?,wordpress,customization,profile,dashboard,custom-fields,Wordpress,Customization,Profile,Dashboard,Custom Fields,我从wp\u USERMETA表中添加并使用了一个USERMETA字段(称为:user\u custom\u hash)。表示我已从代码中的某个位置插入/编辑/删除字段 之前不需要显示它。 所以现在 如何在Wordpress管理仪表板的用户配置文件页面上显示此USERMETA字段?(我是指管理仪表板上的“编辑用户”页面。) 例如: 自定义散列键:\uuuu239cc68ba2423ddf67dcfcd4aa2fa83b 我的意思是,在这里的某个地方展示: 注意: Wordpress当前

我从
wp\u USERMETA
表中添加并使用了一个USERMETA字段(称为:
user\u custom\u hash
)。表示我已从代码中的某个位置插入/
编辑
/
删除
字段

之前不需要显示它。
所以现在

  • 如何在Wordpress管理仪表板的用户配置文件页面上显示此
    USERMETA
    字段?(我是指管理仪表板上的“编辑用户”页面。)
例如:

  • 自定义散列键:\uuuu239cc68ba2423ddf67dcfcd4aa2fa83b
我的意思是,在这里的某个地方展示:

注意:


Wordpress当前版本:3.5.0

现在可以了,因为我自己得到了,如下所示:

add_action( 'show_user_profile', 'display_user_custom_hash' );
add_action( 'edit_user_profile', 'display_user_custom_hash' );

function display_user_custom_hash( $user ) { ?>
    <h3>USERMETA Fields</h3>
    <table class="form-table">
        <tr>
            <th><label>Custom Hash Key</label></th>
            <td><input type="text" value="<?php echo get_user_meta( $user->ID, 'user_custom_hash', true ); ?>" class="regular-text" readonly=readonly /></td>
        </tr>
    </table>
    <?php
}
add_操作('show_user_profile'、'display_user_custom_hash');
添加操作(“编辑用户配置文件”、“显示用户自定义散列”);
函数显示\用户\自定义\哈希($user){?>
用户元字段
自定义哈希键