How to return users to the page they came from after login?

i can’t work out how to send users back to where they came from after registering/logging in. this might be a thread on discourse, or a page on wordpress.

i can set a page, but not just send them back to whichever page they decided to hit the login button on. is it possible? any suggestions?

Are you using the WP-Discourse plugin?

yes

… that right (20 character limit met)

If you’re using the wp-discourse plugin with WordPress as the SSO provider, when a logged out user clicks the login button on a Discourse topic, it should automatically take the user through the WordPress login process and then redirect them back to the Discourse topic.

When a logged out user on the WordPress site clicks on a ‘Start Discussion’, or ‘Continue Discussion’ link, they should automatically be taken through the WordPress login process and then redirected to the correct Discourse topic.

If this isn’t working for your setup, the most likely problem is that another WordPress plugin on your site is redirecting users after login. For a lot of plugins, this is something that can be set on their options page, so it’s worth taking a look at your installed plugins to see if there’s one that could be affecting this.

2 Likes