Skip to:

here’s a trick to redirect user back to topic after login

Viewing 6 replies - 1 through 6 (of 6 total)

  • HowToGeek


    Very nice… that was on my todo list to figure out.

    You rule. As usual.



    I should note that mdawaffe has pointed out to me that apparently bbPress would do this previously if the user has referer’s enabled in their browser. But since most “personal firewalls” block referers by default, you can’t count on that behavior and this change will make it always work instead.

    0.8.4 will supposedly have this new ability by default…



    For my site, I’m using the bbpress login as the site-wide login… so when I put a login link on the wordpress side of the site the user would be redirected to the forum every time after login… kinda annoying.

    With this new knowledge I should be able to fix it so they are redirected back, even to a non-bbpress page.



    Works a charm – thanks _ck_



    Thank you so much. :) It worked !


    John James Jacoby


    A few things. First, this won’t work in bbPress 2. It’s already done for you, and the function names are different. Also, it’s a bad idea to trust any global value to be output directly to the screen, as any plugin can manipulate them directly. You’ll want to wrap that output in an esc_url() call. Lastly, this post is almost 4 years old; bumping it with a simple ‘thanks’ type reeks of being spam.

    Closing this so it doesn’t get bumped again, and anyone that finds this should take heed using that code in bbPress or WordPress going forward, as there are more elegant solutions.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘here’s a trick to redirect user back to topic after login’ is closed to new replies.
Skip to toolbar