Skip to content Skip to sidebar Skip to footer

Wordpress Ajax Request Returns 0

TL;DR: Not Dupe - Code first, scroll to bottom for problem. Here is the link to the demo that I currently have. In functions.php I localize my script first: function ajaxurl(){

Solution 1:

It seems that you are missing the "action" attribute in the params you are sending on the ajax call.

Your params object should be:

varparams = {
  action: "ajax-call",
  cat: category
};

Hope this helps,

Regards,

Marcelo

Post a Comment for "Wordpress Ajax Request Returns 0"