尝试以下操作:
<?php wp_login_form( array(
\'echo\' => true,
\'redirect\' => ( is_ssl() ? \'https://\' : \'http://\' ) . $_SERVER[\'HTTP_HOST\'] . $_SERVER[\'REQUEST_URI\'],
\'form_id\' => \'loginform\',
\'label_username\' => __( \'Username\' ),
\'label_password\' => __( \'Password\' ),
\'label_remember\' => __( \'Remember Me\' ),
\'label_log_in\' => __( \'Log In\' ),
\'id_username\' => \'user_login\',
\'id_password\' => \'user_pass\',
\'id_remember\' => \'rememberme\',
\'id_submit\' => \'wp-submit\',
\'remember\' => true,
\'value_username\' => \'\',
\'value_remember\' => false
)); ?>
2nd Parameter
redirect要重定向到的URL。必须是绝对值(如,
http://example.com/mypage/).
推荐:site_url(“/mypage/”)。
默认值:当前页面
注意:您需要自己配置第二个参数。