Wordpress Frontend Login Redirect

Leave a Comment
If you want redirect a user after he logged in, register Wordpress filter function to handle this redirection.

Here is my Wordpress filter functions.

function redirect_page() {
  return '/new-page-url';
}

add_filter('login_redirect', 'redirect_page');

Please add this in your functions.php file.

If you are using  Wordpress ajax Frontend login, you may redirect an user using window.location.href after you get success response from server.

<script>
window.location.href = "http://example.com/success";
</script>


Also please refer following tutorial if you want to implement Wordpress Frontend User Login and Registration functionality in your project.

Light Weight WordPress Frontend Ajax Login and Registration

0 comments:

Post a Comment