douzhan1238 2012-05-30 15:00
浏览 36

wordpress登录问题

i have created a custom popup login box. and use form settings like that

<form action="<?php bloginfo('url'); ?>/wp-login.php?redirect_to=<?php echo urlencode($_SERVER['REQUEST_URI']); ?>" method="post" autocomplete="off">

and i use input feilds like that

<input id="login_username" name="user_name" type="text" value="" class="pop-input surfix" /><span id="placeholder_user_login">Username</span>

<input id="login_password" name="user_password" type="password" value="" class="pop-input" /><span id="placeholder_user_pass">Password</span>

<input id="register" type="submit" value="Login" class="popup-login-btn" />

but it redirecting to wp-login.php except it should process the login and redirect to the pages where from user started login.

please guide me how can i fix this.

thank you all

  • 写回答

1条回答 默认 最新

  • dpblwmh5218 2012-05-31 05:26
    关注

    actually the issue was with the name element of the input field.

    When i check the wp-login.php page i discover the wordpress changes the name of input fields.

    <input id="login_username" name="user_name"
    <input id="login_password" name="user_password"
    

    to

    <input id="login_username" name="log"
    <input id="login_password" name="pass"
    

    So i just simply replace the names and all issues were sorted out.

    Thank you all

    评论

报告相同问题?