How to add default login form in wordpress
- by admin
- 0
$args = array(
‘echo’ => true,
‘remember’ => true,
‘redirect’ => ( is_ssl() ? ‘https://’ : ‘http://’ ) . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’],
‘form_id’ => ‘loginform’,
‘id_username’ => ‘user_login’,
‘id_password’ => ‘user_pass’,
‘id_remember’ => ‘rememberme’,
‘id_submit’ => ‘wp-submit’,
‘label_username’ => __( ‘Username’ ),
‘label_password’ => __( ‘Password’ ),
‘label_remember’ => __( ‘Remember Me’ ),
‘label_log_in’ => __( ‘Log In’ ),
‘value_username’ => ”,
‘value_remember’ => false
);
wp_login_form( $args );
Reference: https://developer.wordpress.org/reference/functions/wp_login_form/
$args = array( ‘echo’ => true, ‘remember’ => true, ‘redirect’ => ( is_ssl() ? ‘https://’ : ‘http://’ ) . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’], ‘form_id’ => ‘loginform’, ‘id_username’ => ‘user_login’, ‘id_password’ => ‘user_pass’, ‘id_remember’ => ‘rememberme’, ‘id_submit’ => ‘wp-submit’, ‘label_username’ => __( ‘Username’ ), ‘label_password’ => __( ‘Password’ ), ‘label_remember’ => __( ‘Remember Me’ ), ‘label_log_in’ =>…
$args = array( ‘echo’ => true, ‘remember’ => true, ‘redirect’ => ( is_ssl() ? ‘https://’ : ‘http://’ ) . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’], ‘form_id’ => ‘loginform’, ‘id_username’ => ‘user_login’, ‘id_password’ => ‘user_pass’, ‘id_remember’ => ‘rememberme’, ‘id_submit’ => ‘wp-submit’, ‘label_username’ => __( ‘Username’ ), ‘label_password’ => __( ‘Password’ ), ‘label_remember’ => __( ‘Remember Me’ ), ‘label_log_in’ =>…