Title: Login redirect issues
Last modified: August 20, 2016

---

# Login redirect issues

 *  [enile8](https://wordpress.org/support/users/enile8/)
 * (@enile8)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/login-redirect-issues/)
 * I was putting together a new WordPress site the other day, and it needed the 
   ability to login from the front end and it was necessary for it to redirect to
   the current page after login. So I created everything that was needed for this
   but it wasn’t redirecting properly if it was on an index type page or the main
   forum page (bbPress was also part of this install). I was using this as the link:
 * `<?php echo wp_login_url( get_permalink() ); ?>`
 * On index pages it would redirect to the first post on the page, and on the forum
   it would redirect to the last topic which isn’t what I was looking for and I’m
   sure would be frustrating for users. I couldn’t figure this out so I ended up
   writing a custom PHP function to redirect everything properly and it’s working
   now, but I was wondering if anybody else experienced this problem before and 
   what they did to overcome it? Or if this is some sort of bug?
 * Any feedback would be appreciated, thanks.

The topic ‘Login redirect issues’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [enile8](https://wordpress.org/support/users/enile8/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/login-redirect-issues/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
