WordPress live search and filter custom fields September 10, 2022 by Tarik Billa The 500 error means your ajax url is not working. Try using an external js file and wp_localize_script More info in the codex.