• Resolved danielmariveles

    (@danielmariveles)


    Hi!
    Im currently using a post type of Units with custom fields of “Floor Level” and “Building”. The custom fields are already registered in WP rest api and currently displaying the values correctly.

    However i need to filter the JSON returned data based on custom query like this:

    /wp-json/wp/v2/unit?wpcf-floor-level=10&wpcf-building=2

    I hope to hear from you soon.

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Beda

    (@bedas)

    Maybe someone from the community here has more experience with it, but also, I cannot assist Custom Code on Types Plugin.

    I can update you with some information:

    1. Types can only show Post Types in the REST API yet, using the GUI Only.
    2. We have this Plugin here, that is not an officially supported Addon but it was developed to integrate Toolset in the REST API.
    Please acknowledge that this plugin receives no support.
    3. Eventually, someone from the community who worked with Types and the REST API can help further here.

    I am sorry to be of no great help with this custom code.

    Thread Starter danielmariveles

    (@danielmariveles)

    Hi Beda,

    Thank you for your response. How can I use filter on multiple Toolset custom fields like on this link below?

    https://wordpress.stackexchange.com/questions/210597/query-wp-rest-api-v2-by-multiple-meta-keys

    Thanks!

    Plugin Support Beda

    (@bedas)

    I just checked now, with the author of the REST Plugin mentioned above, and we are sorry that we can’t see an easy way to do this. It will require a custom endpoint for such things.

    Thread Starter danielmariveles

    (@danielmariveles)

    Alright. It would be great if you include this functionality in the near future.
    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Filter JSON Response based on Meta Key and values’ is closed to new replies.