Custom Login and Registration form in Ajax
How to create the custom login/Registration form using AJAX. 1 Answer 1 Here is a simple shortcode that gets the job done: add_shortcode(‘ajax_login’,’ajaxlogin_shortcode_handler’); function ajaxlogin_shortcode_handler($atts,$content=null){ if (is_user_logged_in()) return; $retval=”<p id=”message” style=”color:red”></p>” .wp_login_form(array(‘form_id’ => ‘ajaxloginform’,’echo’ => false)). ‘<div id=”login-result” style=”position:absolute; top:300px; left: 670px;”> <img src=”https://wordpress.stackexchange.com/questions/78193/path/ajax-loader.gif”/> </div>’; $js = <<<JS <script type=”text/javascript”> jQuery(document).ready(function($){ $(“#ajaxloginform”).click(function() { // turn … Read more