Sending variable from ajax on form submit

in your html form add <input name=”action” type=”hidden” value=”test_function”/> . here “value” is your “action_name”. Your ajax call is incorect. Data should be url: “your php action script” data: $(‘form#filter).serialize(), About ajax first try to create ajax on your computer without wordpress. When you understand how ajax work try on WordPress. if you want to … Read more

Ajax WP_Query reutrns no results on author.php

Well i figured it out somehow. There were two causes to that issue: tax_query array values cannot be empty. it either the array keys are populated, or there shouldn’t be an array at all. I don’t know why, but giving author a number didn’t work. I’ve changed it to ‘author__in’ => array($author) and it worked. … Read more