T
T
th3_h0st2020-06-20 15:54:57
JavaScript
th3_h0st, 2020-06-20 15:54:57

Wordpress filter ACF + jQuery UI?

Hello everyone
Question about filtering in wordpress by ACF fields.

I need to create a filter widget by area from and to.
I made the frontend part, but I can't do the backend.

I came across the article Creating a WP archive with custom field filter
I roughly understand how the code works there, but in that example the code generates a url and writes the exact value of the variable you select into it.

For me, I need the array to be selected between two variables

'key' => 'full_are', // название произвольного поля
      'value' => array($min_val, $max_val), // переданное значение произвольного поля
      'type' => 'numeric', // тип поля
      'compare' => 'BETWEEN'


How can I get $min_val, $max_val is pretty clear to me, but how can I generate a link like /?min_area=0?max_area=350 ?
By analogy with woocommerce's built-in min_price and max_price

Maybe there are some examples with full code to parse?

Thank you!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question