Skip to content
Advertisement

Why doesn’t my input value end up in tax_query terms after I submit form with ajax

I would like to change my tax_query terms after I submit form with ajax. Ajax form is submitting every time I click on li element. For some reason the data doesn’t end up in terms.

Form setup

JavaScript

Ajax

JavaScript

WP_query

JavaScript

Advertisement

Answer

Your code does not access the form for the filters.

I suggest you do this instead

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement