wp_dropdown_categories()
will produce a select element with the default name and id of cat
. You can change these by passing different values for id
and cat
in the $args
array. The default value
it uses is the term_id. Depending on what you’re expected to use in the get_field()
function, you can also change that in the $args
array.
$args = array(
'taxonomy' => 'download_category',
'order' => 'ASC',
'value_field' => 'slug',
);
Then in the second part:
$cat = esc_attr( $_GET[ 'cat' ] );
$product_args = array(
'post_type' => 'download',
'posts_per_page' => $per_page,
'offset' => $offset,
'download_category' => $cat,
);
I’ve never combined ACF and EDD this way, so it might need some fiddling.