Log In/Log Out Redirects

Overview

Log In/Log Out RedirectsEver wish you could redirect learners to a list of their enrolled courses when they sign in or a custom page when they sign out? With the Log In/Log Out Redirect module of the Uncanny LearnDash Toolkit, it’s easy!

By turning this module on and entering URLs in the module settings, all non-administrator users will be directed to the associated URLs on login or logout. (Please note that administrators are ignored by our module, which means they’re typically redirected to /wp-admin/ instead.)

Video

Video courtesy of LDX Design.

Live Demo

See this module in action on our LearnDash demo site!

Other Redirection Plugins

Important Note: If you have any plugins on your site that can redirect users, in all likelihood they will override this Toolkit redirect. Plugins like LoginWP, Theme My Login and UserPro will all take priority over this module. If you find that our redirect isn’t working, try first disabling any other plugins that may redirect users. If you cannot resolve a redirect issue because something else is overriding this module, we recommending disabling this module and using an alternative like Peter’s Login Redirect, which can override other plugins.

25 replies
  1. Samantha
    Samantha says:

    Created LearnDash course. I followed the Uncanny LearnDash Toolkit tutorial on creating a login/ logout redirect so that anyone who logs in after they purchase my course is redirected to the course page and nothing works. I’ve even uninstalled and re-installed the plug in. I would GREATLY appreciate your suggestions.

    Reply
    • Ryan
      Ryan says:

      It’s likely that something else is overriding the login redirect. If you use WooCommerce, it will. Other plugins can as well. In the note above it doesn’t confirm where users are directed (which might tell us what plugin is doing it), but you might instead try a plugin like Peter’s Login Redirect, which can in turn override other plugin redirect behaviours.

      Reply
      • Samantha Horwitz
        Samantha Horwitz says:

        Thanks Ryan. I did install Peter’s redirect. That didn’t work either. All users, customers, subscribers, admins. When a user logs in it redirects them to create a WordPress account.

        Not super clear how Woocommerce could have any effect. Customers needs to be redirected to cart page, check out page, etc.

        Reply
        • Ryan
          Ryan says:

          Sorry, WooCommerce automatically directs users on login to its My Account page if you use Woo; it’s just one example of plugins that have their own login redirect behaviours. Try disabling other plugins in a Staging environment to try to narrow down the culprit.

          Having said that, from your first paragraph it sounds like users log in then they’re redirected to log in again. That could instead indicate an https/http conflict on your site. Make sure that if you’re using an SSL cert that everything on the site is https.

          Reply
  2. Andrew
    Andrew says:

    I have added a /login/ page with the [uo_login_ui] shortcode but when I turn on ‘Front End Login’ and set the ‘Login Page’ to Login, All users get invalid username or password and I am forced to FTP in and kill the plugin. Can you point me towards a solution?

    Reply
    • Ryan
      Ryan says:

      Hi Andrew, make sure that there is no caching whatsoever on your /login/ page. If the host does caching, ask them to exclude that page. Note that this comment is attached to the incorrect Knowledge Base article, and for Toolkit support it’s easier for us to see comments if you log them on the WordPress.org support site.

      Reply
  3. Muthukumar
    Muthukumar says:

    peters login redirect not working with learn dash plugin. can you refer some other plugin that will work for all user roles.

    Reply
    • Ryan
      Ryan says:

      It definitely works with LearnDash; if it’s not, another plugin is taking priority over the redirection. Try temporarily deactivating other plugins and then reactivating them to trace which one is creating the override. If the redirect issue is with Group Leaders and you use Improved Group Leader Interface in Pro, make sure you update to the latest version and set your Group Leader redirects there.

      Reply
    • Ryan
      Ryan says:

      I’m afraid our plugins can’t support that scenario. It would be possible with a bit of development, but for now I can’t offer an easy solution.

      Reply
  4. Chantal Visser
    Chantal Visser says:

    I’ve been running a course with uncanny and learndash and it works very well but lately I’ve noticed something strange: When a user is logged in and navigates to the home page the menus change as if the user isn’t logged in but if they go back to “my account” then the menu looks like the user is logged in again.

    Can you think of any reason why the home page would cause this change? It seems to be the only page that has this problem.

    Reply
    • Ryan
      Ryan says:

      It’s definitely going to be caching. A lot of hosts that use server-side Varnish caching don’t allow the homepage to be excluded either, and this can be difficult to work around. Maybe chat with them (assuming it’s not a caching plugin) or even make it so signed in users trying to access the homepage are redirected to a learner dashboard or something similar.

      Reply
  5. Alejandro
    Alejandro says:

    Hello. I use both modules “Log In/Log Out Links” and “Log In/Log Out Redirects” and “Front End Login”, but I need that Log In link redirect to my Front End Login, not the ugly WordPress standard login. Any suggestion? Thanks, very useful modules for LearnDash system

    Reply
    • Ryan
      Ryan says:

      Hi, for WordPress to know where to redirect the user, you must have a page on your site that includes the uo_login_ui shortcode and that page must be selected in the Front End Login module settings as the login page. That’s what determines the target for the Log In link. I hope that makes sense.

      Reply
  6. Tammy Slauenwhite
    Tammy Slauenwhite says:

    I love the login/logout redirect, and it works great, but there are certain places on my website where I use Elementor Pro’s login widget to set a different redirect. Uncanny Owl is overriding this. I can’t seem to figure out how to make my specific EP logins override Uncanny. Any suggestions?

    Reply
    • Ryan
      Ryan says:

      Hi Tammy,

      It may be possible to resolve the conflict by reducing the priority value in the settings for our module. Maybe Elementor could confirm the redirect priority value they’re using for theirs so you’ll know what to set ours up with.

      Reply
  7. Henk Werner
    Henk Werner says:

    Hi,

    Can the log out redirect be an external link? I’ve set it to be our Facebook group. At the moment, it’s not (yet) working.

    Cheers,
    Henk

    Reply
  8. Sergio
    Sergio says:

    Hi, is there a way to have only users in the Participant list redirect? We have several non-admin types that should not be redirected elsewhere. Code would be fine.

    Reply
    • Ryan
      Ryan says:

      I’m not sure what you mean by “Participant list”, but if you want role-based redirects we like Peter’s Login Redirect plugin.

      Reply
  9. Zzo
    Zzo says:

    Hi, I use the “Log In/Log Out Redirects” which is working great until I add the “Front End Login” add-on, then the redirect is not working anymore. When login, it redirects to the home page and after logout to the login page mentioned in the “Front End Login” add-on.
    Is there a way to fix that?

    Reply
    • Ryan
      Ryan says:

      Are you using the new modal system for the front end login? If you are, it triggers a page refresh that will unfortunately block the redirect from working as it should (it will be changed in the next release). If that’s not it, maybe you can file a ticket with more details (including the redirect priority you’re using for the redirect module) and we can provide more feedback.

      Reply
  10. Liz Taylor
    Liz Taylor says:

    Like user Zzo I would also very much like to use Front End Modal and Redirect on the same site (same page) and they won’t work together. Looking forward to the refresh going away. Also it would be great if the Redirect after logging in function could be set to certain pages. Thanks!

    Reply

Comments/Questions

Please note that this is not a support forum. If you are experiencing issues on your site, please open a support ticket instead. Site-specific support questions submitted as comments will be unanswered.

Leave a Reply

Your email address will not be published. Required fields are marked *