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.