Login Redirection

When logging in and out, Login With AJAX can redirect users to a specific URL. This can be configured within the Redirection tab on our settings page located in WP Dashboard > Settings > Login With AJAX

For both logins and logouts you can add a general global rule for all users and/or a specific rule for specific user roles.

Redirects will occur for logins and logouts throughout the site, not just those initiated via our own forms.

Dynamic Placeholders

In both cases (logins/logouts), you also have some dynamic fields you can use to generate a URL based on the specific user, which we'll cover below.

Logout Placeholders

Placeholder Description
%LASTURL%

This will redirect the user to the last URL they were on, meaning the page where they clicked the logout button.

Note This would generally be used on its own, since a full URL is generated. You could, in theory, add additional query parameters but you would have to account for whether your URLs always do or don't have parameters.
%LANG%

The language used by the current page/user, which is compatible with WPML and PolyLang (possibly more, not tested). For example, Spanish pages will produce an es value.

Login Placeholders

Placeholder Description
%LASTURL%

This will redirect the user to the last URL they were on, meaning the page where they clicked the logout button.

Note This would generally be used on its own, since a full URL is generated. You could, in theory, add additional query parameters but you would have to account for whether your URLs always do or don't have parameters.
%USERNICENAME% A URL-friently rendition of the username, which could be used like so: yoursite.com/user/%USERNICENAME%/
%USERNAME%

The exact username of the user. If you are using this within a URL, particularly within a permalink structure such as yoursite.com/user/the_username/, use %USERNICENAME% instead. This placeholder may be useful in query paramenters.

%LANG%

The language used by the current page/user, which is compatible with WPML and PolyLang (possibly more, not tested). For example, Spanish pages will produce an es value.