Hi @futureyoon
You don’t need to do anything extra for that, as that is the default behavior of Nextend Social Login that is redirects you back to the same page where you pressed the social button.
So e.g. if you display the social button on a URL like this:
then if you press the button there, after the login with social login you will be redirected back to https://example.com/my-post page
However if you mean a redirection more like this:
- You are at https://example.com/post1
- from there, you redirect the user to https://example.com/custom-login-page where you display the social button
- you press the social button at https://example.com/custom-login-page and after the login you want to be redirected to https://example.com/post1
If this is the case, then I am sorry, but we don’t have an out of the box solution for that.
If you want to redirect the user to an URL from before, then you need to pass that particular URL in a specific GET parameter at the time when you redirect the user to the page where you display the social button. We respect the “redirect_to” GET parameter, that WordPress also users for the redirects, so e.g. if from:
you redirected the user to a link like this
where the redirect_to GET parameter contains the URL encoded url of the page where you want to be redirected, then we would respect that, and after the login with social login, we could redirect the user to the URL that the redirect_to GET parameter contains. So basically you need to build the “custom-login-page” link dynamically via JavaScript using the URL of the current page.
Please note that, this requires developer knowledge, as we can not provide support for custom coding!
Best regards,
Laszlo.