Finding post ID dynamically on click

What you’re looking to accomplish isn’t really pagination. That threw me off initially. You’re building a navigation that will be site-wide. If that’s the case, you can either capture the ID from the url (this is not very performant) or add the ID to the markup. This example shows you how to add the ID … Read more

wordpress admin ajax trash_comment

The way you’re adding parameters to the url isn’t working. The ajax request is designed to prevent parameter insertion like this. I recommend you kick off another ajax request to handle this process rather than trying to hook into the existing process in this way. For example, you can kick off your modal window after … Read more

use a single nonce in three different nonce field

You can pass multiple nonces with wp_localize_script() by just including them as separate properties in the ajax_login_object object. wp_localize_script( ‘ajax-login-script’, ‘ajax_login_object’, array( ‘ajax_url’ => admin_url( ‘admin-ajax.php’ ), ‘login_nonce_token’ => wp_create_nonce( ‘login_nonce’ ), ‘register_nonce_token’ => wp_create_nonce( ‘register_nonce’ ), ‘lostpassword_nonce_token’ => wp_create_nonce( ‘lostpassword_nonce’ ), ) ); Then in your JS, use the correct one from your localize … Read more