Saving (Updating) Post / Page Edits With AJAX

The german (core) developer Dominik Schilling/ocean90 has released a pretty nice, simple and small plugin to encounter (part of) this problem. Instead of adding a complex AJAX save process, that would just make it harder to work with even handlers and such (de- & re-registering them), he just added a position marker, that allows WP … Read more

jQuery and AJAX Not working with Select Form Element

instead of this: jQuery(‘#wpuf_new_post_form’).submit(function(e) { Try this way, it should work for you. jQuery(document).on(“submit”, “#wpuf_new_post_form” , (function(e)) { var data2 = jQuery(‘#wpuf_new_post_form’).serialize(); first do console.log(data2) try it, should print entire form ‘s data in console.

AJAX filter posts on click based on category

This line in functions.php is your problem: $cat_id = get_post_meta($_REQUEST[‘cat’]); I think you are misunderstanding the purpose of the get_post_meta() function. It is designed to get metadata for a WordPress Post, not data from a POST request to the site. The first parameter of the get_post_meta() function is the $post_id, but since you are passing … Read more

WP set auth cookie using Ajax is not saved to browser

I assume that your custom dashboard is on a different domain/subdomain than the WordPress installation. Cookies can only be set for the current domain. Typically cookies will not work cross domain. So your dashboard cannot create a cookie for the WordPress website. Theoretically it’s possible to bypass with some server configurations, but this technique has … Read more

How to tie built in AJAX to an add_action?

I found a way around this by not using the JS methods themselves but basically listening for their attached AJAX calls and taking it from there. This was my final code. I used the the QueryStringToHash function listed here to parse the data sent in the first place, and use this to determine if I … Read more