• Resolved hokopt

    (@hokopt)


    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)?

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    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_to in the Login URL. e.g. www.yoursite.com/login/?redirect_to=/the-post-url-here/

    Regards,

    Thread Starter hokopt

    (@hokopt)

    Hi,

    I want to redirect to the last post visit before i click to login
    https://www.yoursite.com/login/?redirect_to=?????

    Plugin Contributor Champ Camba

    (@champsupertramp)

    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=sharing

    So 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,

    Thread Starter hokopt

    (@hokopt)

    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 4 years ago by hokopt.
    Plugin Contributor Champ Camba

    (@champsupertramp)

    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=sharing

    Regards,

    Thread Starter hokopt

    (@hokopt)

    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)

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @hokopt

    Where do you restrict the page/post? Is it via the UM Content Restriction in individual Page/Post?

    Regards,

    Thread Starter hokopt

    (@hokopt)

    Hi,
    The message is set global on UM
    then if i want a post restrited ative in the post the global message

    Hi 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?

    ??

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @hokopt

    Please try this code snippet in the link:
    https://gist.github.com/champsupertramp/51763fa171d35a839ff92d7c3ad8d7b4

    You 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:
    https://www.yoursite.com/login/?redirect_to=https://www.yoursite.com/content-restriction/

    Regards,

    • This reply was modified 3 years, 11 months ago by Champ Camba.
    • This reply was modified 3 years, 11 months ago by Champ Camba.
    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @ryanses

    I already responded to your other topic. Please check.

    Regards,

    Thread Starter hokopt

    (@hokopt)

    Hi, @champsupertramp

    Thanks!
    I have try your customization but not get the redirect work, have you a demo or tes online?

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @hokopt

    I’ve updated the code in the link:
    https://gist.github.com/champsupertramp/51763fa171d35a839ff92d7c3ad8d7b4

    Here’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=https://www.yoursite.com/content-restriction/">Click here to Login</a>

    Regards,

    Thread Starter hokopt

    (@hokopt)

    Thanks

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Redirect login’ is closed to new replies.