Ensure jquery is activated In your function that hooks “wp_enqueue_scripts”, add this: Simple Working Example In functions.php In your php (html) page
Category: AJAX
AJAX Background Post and Get Response
Ensure jquery is activated In your function that hooks “wp_enqueue_scripts”, add this: Simple Working Example In functions.php In your php (html) page
AJAX Background Refresh Status From Server
Ensure jquery is activated In your function that hooks “wp_enqueue_scripts”, add this: A working example In functions.php In your HTML
AJAX Dynamic Page Content
Simple ajax call to dynamically load page content, solving issues of page caching etc. Ensure jquery is activated In your function that hooks “wp_enqueue_scripts”, add this: HTML AJAX Callback
Creating an API URL
You may want a url to be used for say remote devices to connect to your site and pass information using say URL parameters and a response string. You can create a special url and trap it using the code below. However for it to work in all instances you need to have a real […]
Nonce Functions
Logged in / Not logged in The nonce works for both wp_create_nonce() and wp_verify_nonce() use the logged in user ID and will not work for other users or if the user has logged out. MySiteSomeUniqueNonceNameThis field is actually defined as an action name, so you can set this differently per form on your site, so […]