It seems that if a new user tried to access blocked content, then clicked on the Register link under the Login form, and I wanted to redirect them to the blocked content after they registered and logged in, I would need to do a (“chained”?) sequence of two redirects
So it seems like I first would need to do the following:
https://rocketgeek.com/plugins/wp-members/users-guide/filter-hooks/wpmem_register_redirect/
and then do the following:
https://rocketgeek.com/plugins/wp-members/users-guide/filter-hooks/wpmem_login_redirect/
Is this correct?
Is this doable? (“Chaining” two redirects?)
If so, where would I put this code? I guess it would go in the function where they first attempted to access the blocked content.
Your documentation is great by the way. I’m just starting to explore it, but it seems much better than what many PHP programmers provide. (Not my best language, but I can read it and maybe hack it a bit.)
So now I’m thinking of the following approach:
(1) Find the procedure where the user attempts to access blocked content.
(2) Redirect them to the Login form here.
(3) Let the user click on the Register link (under the Login form).
(4) Let them log in.
(5) This whole time, remember the URL of the blocked content, and redirect them there.
I’m not sure if this is too complicated, because the user is going through a series of pages (attempt to access blocked content, redirect to Login form, click Register link, register, login – and then finally get redirected to blocked content).
Maybe this involves too many redirects, which might interfere with other redirects already in the code.
However, this seems like a very typical use case: new user trying to access blocked content, redirected to Login form, clicks Register link, registers, logs in… then they should ideally be redirected to the blocked content.
Its a lengthy chain of clicks and redirects but it is also a very typical use case, so I hope there is a way to do it!
Thanks.