Ajax Login and Redirect
BuddyApp: Ajax Login and RedirectOur 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 popupShow the modal on page load
Section titled “Show the modal on page load”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 popupRedirection
Section titled “Redirection”In our theme we have the following options for redirection.
- Reload page
Section titled “- Reload page”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
- Default WordPress Redirect
Section titled “- Default WordPress Redirect”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.