Redirect login
-
Hello,
How can i have personalized a link on the Restricted Access Message (Global)
Ex: a link to the login page and after successful login, redirect to the post (before restricted)?
-
Hi @hokopt
It’s not clear what you want to achieve. Do you want to redirect a user to a specific post after submitting the Login form? If so, you can add the
redirect_toin the Login URL. e.g.www.yoursite.com/login/?redirect_to=/the-post-url-here/Regards,
Hi,
I want to redirect to the last post visit before i click to login
http://www.yoursite.com/login/?redirect_to=?????Hi @hokopt
If you want to redirect users to the login page after viewing a restricted post/pages, you can set the global site access setting to logged-in users:
https://drive.google.com/file/d/1IgZQrIPt1xQgEKKbr91n4Lq6JgQAXGXD/view?usp=sharingSo when a user visits the restricted page/post, they will be redirected to the login form. And once they submitted the login form successfully, they will be redirected to the previous page/post.
Regards,
Hi Champ Camba,
I have customize my Restricted Access Message (Global) with your code, but not worked…
after i click on the link LOGIN HERE and do the login, no redirect to the post before…<script> jQuery(function( $){ var touchmoved; $('.um—profile—nav—item a').on('touchend', function(e) { if(touchmoved != true){ return true; } }).on('touchmove', function(e){ touchmoved = true; return false; }).on('touchstart', function(){ touchmoved = false; return false; }) ; }); </script> <a href="#LINK TO MY LOGIN FORM PAGE CUSTOMIZE FOR A GROUP"><strong>Login Here</strong>.</a>-
This reply was modified 5 years, 6 months ago by
hokopt.
Hi @hokopt
I’m sorry I’ve sent you the wrong screenshot.
Here’s the screenshot with the settings I’m talking about:
https://drive.google.com/file/d/1aH9QDjctGwEjN_1_Ff2UnE5YJ_pLRRGS/view?usp=sharingRegards,
Hi, Champ Camba
My site are set to “Site accessible to Everyone”…. your suggestion not suitable for me.GOAL:
1. Visit a restricted content post
2. On a global message click on the link to login form
3. Make login on page login and redirect..
4. -> Redirect to the before restricted content post (now open not restricted)Hi @hokopt
Where do you restrict the page/post? Is it via the UM Content Restriction in individual Page/Post?
Regards,
Hi,
The message is set global on UM
then if i want a post restrited ative in the post the global messageHi Everyone,
Is it possible to have an existing page on my website be placed behind the login prompt? Im manually registering people and sending them a username and password. I want them to come to the website and use the login prompt but after submitting the logon button I want them to be redirected to a specific page that is only visible to those who are logged in. Is this possible?🙂
Hi @hokopt
Please try this code snippet in the link:
https://gist.github.com/champsupertramp/51763fa171d35a839ff92d7c3ad8d7b4You can now add a shortcode in the Global Access Message:
WP Admin > Ultimate Member > Settings > Access > Restriction Content > Restricted Access Message.Shortcode: [um_login_redirect]
The above shortcode will return a URL that you can add with the
<a>anchor.
e.g.<a href="[um_login_redirect]">Click here to Login</a>The generated URL pattern would look like this:
http://www.yoursite.com/login/?redirect_to=http://www.yoursite.com/content-restriction/Regards,
-
This reply was modified 5 years, 6 months ago by
Champ Camba.
-
This reply was modified 5 years, 6 months ago by
Champ Camba.
Hi, @champsupertramp
Thanks!
I have try your customization but not get the redirect work, have you a demo or tes online?Hi @hokopt
I’ve updated the code in the link:
https://gist.github.com/champsupertramp/51763fa171d35a839ff92d7c3ad8d7b4Here’s the new usage:
Shortcode:[um_login_redirect]Click here to Login[/um_login_redirect]The above shortcode will render the following:
e.g.<a href="https://yoursite.com/redirect_to=http://www.yoursite.com/content-restriction/">Click here to Login</a>Regards,
Thanks
-
This reply was modified 5 years, 6 months ago by
The topic ‘Redirect login’ is closed to new replies.