Skip to content
Docs

Ajax Login and Redirect

Our theme comes by default with a login modal where you can authenticate without a page refresh. The process is done in the background and you will see success messages or error messages in the popup.

You can trigger the modal popup in several ways:

Section titled “You can trigger the modal popup in several ways:”
  • from the site menu by adding a Login menu from Appearance - Menus - KLEO

  • by adding any element in your page with a class “show-login”

Example:

Show Login popup

To open a page with the modal visible by default you can set the link to your page with #show-login in the end, like this:

Page link with Login popup

In our theme we have the following options for redirection.

This means that after the login, the current page will be reloaded and you will be logged in so you can stay on the same page

Set it like this if you want to customize your redirect logic with a plugin like Peter’s Redirect. In this mode it will follow WordPress default redirect logic which means you can hook into “login_redirect” filter for customizations.