• Resolved cadelh

    (@cadelh)


    Hi!

    I use your plugin with ACF v4.4 (free edition) and have some problems filtering multiple list selection:

    considering a JSON looks like this:

    “acf”:{
    “mykey1″:”simpleValue1”,
    “mykey2”:[“Choise1”],
    “mykey3″:”simpleValue2”,
    “mykey4”:[“Choise1″,”Choise2″,”Choise3”]
    }

    for simple text field, I use:
    http://localhost/wordpress/wp-json/wp/v2/products?
    &filter[meta_key]=mykey1
    &filter[meta_value]=simpleValue1

    and with conditions:
    http://localhost/wordpress/wp-json/wp/v2/products?
    filter[meta_query][0][key]=mykey1
    &filter[meta_query][0][value]=simpleValue1
    &filter[meta_query][1][key]=mykey3
    &filter[meta_query][1][value]=simpleValue2
    &filter[meta_query][relation]=OR

    It works fine!

    But for my multiple select list (fields “mykey2” and “mykey3”) it should be:

    http://localhost/wordpress/wp-json/wp/v2/products?
    filter[meta_query][0][key]=mykey3
    &filter[meta_query][0][value][0]=Choise1
    &filter[meta_query][0][value][1]=Choise2
    &filter[meta_query][0][compare]=IN

    OR

    http://localhost/wordpress/wp-json/wp/v2/products?
    filter[meta_query][0][key]=mykey3
    &filter[meta_query][0][value]=Choise3

    but these url does not work for me 🙁
    Could you help?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author sk8tech

    (@sk8tech)

    I’ll need for information on this, such as your environment, wordpress version, your ACF settings, etc.

    Plugin Author sk8tech

    (@sk8tech)

    Hello, Thank you for your message. What you’re looking for is a filter based on a value, within an array value of a ACF key.

    I’m afraid this is not supported at this time, but we’ll keep it in mind and put it on the roadmap.

    Thanks

    Hello, this plugin has been really helpful.

    I agreed with @cadelh, I’d like to filter posts for multiple selection values, so would be good to see a route like:

    http://localhost/wordpress/wp-json/wp/v2/products?
    filter[meta_query][0][key]=mykey3
    &filter[meta_query][0][value][0]=Choise1
    &filter[meta_query][0][value][1]=Choise2
    &filter[meta_query][0][compare]=IN

    Plugin Author sk8tech

    (@sk8tech)

    @becarlos Thank you for your +1. It’s already on our roadmap and we’ll add in this feature asap.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘ACF Multiple select list’ is closed to new replies.