• Hi. I made my own wordpress design and I have a login box. When I put the username and password it redirects me to the admin page. I want that when I put the username and password, it logs me in but keeps me in the same page. How can I do that? Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • This works quite well. Very customizable. Peter’s Login Redirect

    Thread Starter xionhack

    (@xionhack)

    that plugin has to be configured by user and I have to set up which website to go to. The login form is in every page, I want it to no matter which page u login from, u stay in that page

    This plugin still seems to work. Just tested it on 3.1 and it did what you want. It returned the user to the same page after login and logout.
    It requires no effort on your part other than activating the plugin. I’ve used it several times in the past. In the half-dozen login/out tests I just made, it worked fine. Can’t guarantee your results will be the same.

    https://files.viper007bond.com/wordpress/fromwhereyoucame.zip

    You can do it via ajax, using wp_signon($_POST) – just include in your query the fields ‘user_login’, ‘user_password’ and ‘remember’.
    So, if the ajax request return true, you can do (with javascript) location.reload(); otherwise alert someting like ‘authentication failed’.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘When login, stay in the same page’ is closed to new replies.