My recommendation would be to use a plug-in like Lightbox Plus to power your link. Clicking the link would load your standard login form inside a lightbox. You could then automatically redirect to the same page so that, once logged in, users can leave a comment.
Basically, you’d dynamically build your link to be something link this:
<a href="http://yoursite.com/wp-login.php?redirect_to=http%3A%2F%2Fyoursite.com%2Fpostname" rel="lightbox[login-form]" itle="Please login to comment">Login to Comment</a>
This would load the login form in a lightbox and set it to redirect to the post upon successful authentication. This might be all you need, but I haven’t tested it … so give it a try and, if needed, add some other scripts to reload the page upon successful login.
Related Posts:
- how to use reCaptcha v3 in wordpress custom login form?
- Adding “Remember Me” in custom login
- wp_set_auth_cookie() doesn’t work in Ajax call
- How build a custom login/register form with error handling?
- Update user meta using with ajax
- Detecting post type within init action
- How to link WordPress heartbeat to ajax form
- WordPress Ajax Login without page reload
- WordPress Nonce Issue for Ajax Login and Logout
- How can I automatically login using a URL?
- How to correctly load wordpress in a non WP script for AJAX request
- Custom Login and Registration form in Ajax
- Insert wp_editor on front-end with AJAX?
- Help with AJAX front end comment moderation
- Is it safe to manually sign a user in using AJAX?
- Using AJAX with Forms
- Three level taxonomy dropdown frontend
- Why a strange discrepency between get_current_user_id() when using AJAX versus output of document.cookie?
- Performance optimization of tree like structure
- Ajax login without redirect/reload
- Is it secure to use admin-ajax.php in front?
- Best way to use ajax front-end?
- Interim-Login form on frontend
- Custom Login with Ajax not working with IE
- wp_ajax declaration confusing for Front end
- How to get post from pure frontend AJAX (using only post ID)?
- jQuery.post returns 0
- Ajax login fails: script sets cookies, but is_user_logged_in() returns false
- How to prevent my external API call from being called by anyone but me (my site)
- WordPress custom ajax login not working on mobile browsers
- Update user meta via ajax from frontend, saving issue
- Edit user meta on front-end via AJAX
- How to test if in dashboard, bypassing Ajax quirk
- ajax page template
- Refresh HTML Page in Browser Automatically on Timer – Every 15 Min
- How to get a unique nonce for each Ajax request?
- Open a Thickbox with content trough AJAX
- failed to load wp-admin/admin-ajax.php
- How to HTML5 FormData Ajax
- How to fake a WordPress login?
- Ajax requests without JQuery
- How declare Ajax functions ussing SHORTINIT
- jQuery Autocomplete not working with wp_localize_script
- Load custom formatted comment with AJAX: reply link isn’t rendered?
- WP REST API route request explain
- Ajax returning correct data BUT at wrong place
- Creating a Front-end based User Search
- Edit post meta with checkboxes on front end
- admin-ajax.php mixed content
- WooCommerce: Translation lost on AJAX call in Checkout page [closed]
- Async Loading of Custom Posts
- Call javascript function when category was added via ajax
- How to add WP API and JS featured image attachment
- Can’t publish post using ajax
- Ajax in plugin settings page returns 400 Bad Request
- Customizer AJAX using buttons
- WordPress Ajaxify Problem with Scroll-to [closed]
- Stop ajax listener from sending empty parameter to function
- Can’t trigger an AJAX function with a submit button in the dashboard
- Exposing data using a custom WordPress API
- Use WP admin AJAX url to hide API key
- How to do the simplest possible frontend ajax call from a plugin?
- 400 Bad Request when sending XHR from React.js to admin-ajax.php
- Making POST request with AJAX returns a 400 error (without jQuery)
- Load image src through Ajax by ID?
- Using get_theme_mod in php ajax form doesn’t work
- PHP session when called wp_ajax_nopriv
- What exactly does ‘authenticated’ mean for wp_ajax_nopriv?
- Alert Message through email or phone(Message)
- How to use Jeditable plugin with admin-ajax.php?
- WordPress Ajax Not Firing
- Get uploaded attachment width & height and attachment ID after upload them
- Disabling ajax code that does a POST request that ends in a 400 error code
- Refresh checkout fields on add to cart with order bump
- Is it good practice to use REST API in wp-admin plugin page? [closed]
- get a bad request 400 on my ajax-admin.php file
- Registration form AJAX check for existing username (simple version)
- How to check Ajax request only when i opened the Notifications list?
- Syntax error on query_vars while handling with Jquery
- Want to send ajax request in wordpress to a custom file in plugin
- How to send the checkbox value to email
- Class called in template, AJAX not registering
- How to lock WordPress front-end with login and password?
- AJAX Call in Plugin Returns More than JSON
- Ajax take too long to return code
- problem when adding wp_editor with ajax [duplicate]
- Get wp-load.php PATH with wp_localize_script and JavaScript for plugin
- Ajax Form seems to post, but does not return
- Ajax request to admin-ajax.php and window.location.href
- Objects and get_post_meta() gives me 1 string for latitude and longitude
- Memberpress isn’t cooperating with WooCommerce
- where does my function output from load-* go?
- WordPress ajax requst returns zero
- wp_editor() in content that was loaded with ajax [duplicate]
- WordPress blocking polling request when signed into Admin
- Send button using own contact form [closed]
- Front-end ajax problem all users and guests getting a 302 redirect when accessing wp-admin/admin-ajax.php
- Use Ajax to get an Options Settings Value
- WordPress – Security Question at Login from User’s Meta Data
- wp_login_form display no styled form