在主题中添加额外的注册字段我的插件wordpress

我试图在主题中添加一些额外的字段作为我的登录插件Wordpress。

我已经完成了主题文档。

多余的字段未保存在数据库中。我也已经在数据库中添加了额外的字段, 但是仍然没有将数据保存在数据库中

有什么建议吗?


#1


你需要使用自定义类型, 而不是text和first_name

function add_tml_registration_form_fields() {
    tml_add_form_field( 'register', 'custom_1', array(
        'type'     => 'custom', 'label'    => 'First Name 1 ', 'value'    => tml_get_request_value( 'first_name_test', 'post' ), 'id'       => 'first_name_test', 'priority' => 15, ) );
    tml_add_form_field( 'register', 'custom_2', array(
        'type'     => 'custom', 'label'    => 'Last Name 1', 'value'    => tml_get_request_value( 'last_name_test', 'post' ), 'id'       => 'last_name_test', 'priority' => 15, ) );
}
add_action( 'init', 'add_tml_registration_form_fields' );

读这个

https://docs.thememylogin.com/article/104-function-tmladdformfield

来源:

https://www.srcmini02.com/64713.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_41256.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?