Free WordPress Login With Ajax pluginFree

18 168 websitesFree WordPress Login With Ajax plugin by Marcus Sykes

Login With Ajax is for sites that need user logins or registrations and would like to avoid the normal wordpress login pages, this plugin adds the capability of placing a login widget in the sidebar with smooth AJAX login effects.

Some of the features:

  • AJAX-powered, no screen refreshes!
    • Login
    • Registration
    • Remember/Reset Password
  • Custom Login/Logout redirections
    • Redirect users to custom URLs on Login and Logout
    • Redirect users with different roles to custom URLs
    • WPML – Language-specific redirects
  • SSL-compatible
  • Fallback mechanism, will still work on javascript-disabled browsers
  • Compatible with WordPress, MultiSite, BuddyPress and many other plugins that alter the login/registration form (e.g. captcha plugins)
  • Customizable, upgrade-safe widgets
  • shortcode and template tags available
  • Widget specific option to show link to profile page

If you have any problems with the plugin after reading the FAQ, Other Notes, etc. please visit the support forums.

Translated Languages Available

Here’s a list of currently translated languages. Translations that have been submitted are greatly appreciated and hopefully make this plugin a better one. If you’d like to contribute, please have a look at our translation site, or let us know on the support forums.

  • Afrikaans – Johnny Dunhin
  • Albanian – Besnik Bleta
  • Arabic (SA) – Adel Madshel
  • Bosnian – Nenad Cvetkovic
  • Catalan – Xavi Valenti
  • Chinese – Simon Lau
  • Czech – Marek Liolias, Ondra Kalous, Henry Greek, Viktor Jezek
  • Danish – Christian B.
  • Dutch – Sjors Spoorendonk
  • Estonian – Oliver Busch
  • Finnish – Jaakko Kangosj√§rvi
  • French – Geoffroy Deleury
  • German – Linus Metzler
  • Greek – George Alexakis, Lamprakis Fousekis
  • Hebrew – Menachem Shapiro
  • Hindi – Anonymous
  • Hungarian – Lorinc Borda
  • Italian – Marco aka teethgrinder
  • Japanese – Ryuei Sasaki
  • Limburgish – Anonymous
  • Lithuanian – Gera Dieta
  • Persian – Mohammad Hosein Ameri, Mohammad Akbari
  • Polish – Ryszard Rysz
  • Portuguese (Brazil) – Humberto S. Ribeiro, Diogo Goncalves, Fabiano Arruda
  • Romanian – Gabriel Berzescu
  • Russian – xl32,
  • Slovak – Branco
  • Spanish – Myself and Danilo Casati
  • Swedish – Tommy Wahlund
  • Turkish – Mesut Soylu, Oskay Yurtturk


Upgrading from v3 to v3.1

Due to the improvmenets necessary (specifically allowing multiple LWA widgets on one page), it was important to modify the template files to use classnames instead of ids.

If you have customized your widgets as per the instructions below, you will need make some modifications to your templates, and probably re-evaluate whether you still need custom JS if you went that far.

We’ve tried to minimize potential conflicts arising from this, but you should consider revising your template regarding these two points:

  • LoginWithAjax is now a static class, so things like $this->function() and $this->variable should become LoginWithAjax::function() and LoginWithAjax::$variable
  • Element IDs are now classnames, and are converted like so (we do have backwards compatibility to account for this, but still recommended):
    • LoginWithAjax becomes lwa
    • classname is all lowercase
    • underscores become hyphens
    • Example : LoginWithAjax_Form > lwa-form

Shortcodes & Template Tags

You can use the shortcode [login-with-ajax] or [lwa] and template tag login_with_ajax() with these options :

  • profile_link – (1 or 0)
    • If value is 1 (default), a profile link to wp-admin appears.
  • registration – (1 or 0)
    • If value is 1 (default), a registration link appears, providing you have registration enabled in your WP settings.
  • template – (template name/directory)
    • If this template directory exists, this template will be used. Default is ‘default’ template.
  • remember – (1 or 0)
    • If value is 1 (default), a remember password link appears for password recovery
  • redirect
    • Successful logins are redirected to this URL

SSL Logins

To force SSL, see The plugin will automatically detect the wordpress settings.

Customizing the Widget

You can customize the html widgets in an upgrade-safe manner by copying files and editing them within your theme. Firstly, you need to understand how Login With Ajax loads templates:

  • When looking for files/templates there is an order of precedence – active child theme (if applicable), active parent themes, and finally the plugin folder:

    • wp-content/themes/your-theme/plugins/login-with-ajax/
    • wp-content/themes/parent-theme/plugins/login-with-ajax/
    • wp-content/plugins/login-with-ajax/widget/
  • Login With Ajax loads only one CSS and JS file which contains code for all templates. The plugin checks the locations above and loads the one it finds first. The default files are:

    • wp-content/plugins/login-with-ajax/widget/login-with-ajax.js
    • wp-content/plugins/login-with-ajax/widget/widget.css
  • One caveat for JavaScript files, if you’ve enabled WP_DEBUG, then LWA will look for a file called login-with-ajax.source.js, a non-minified version of the normal JS file.

  • Login With Ajax then checks for template folders which are loaded according to the preference highlighted above.

    • When a user is logged out, the widget_out.php will be used.
    • If logged out, then widget_in.php will be used
    • If either of these files don’t exist in your template, the one located in the default folder will be used (which you can also override in your theme).


If you wanted to change some text on the default theme, you could simply copy wp-content/plugins/login-with-ajax/widget/default to wp-content/themes/yourtheme/plugins/login-with-ajax/default and edit the files as needed.

If you need to change the CSS file, copy the file wp-content/plugins/login-with-ajax/widget/widget.css over to wp-content/themes/yourtheme/plugins/login-with-ajax/widget.css and edit accordingly.

The JavaScript ajax magic relies on the class names and hierarchical structure within the template files, if you want to modify the templates without adding your own JS, make sure you keep these class names and structure intact.

Author: Marcus Sykes

Tags: ajax,Ajax login,login,redirect redirect,registration

Source from: