svrooij / rest-api-filter-fields

Filter the fields returned by the Wordpress rest api (v2)
https://wordpress.org/plugins/rest-api-filter-fields/
MIT License
32 stars 6 forks source link

Support acf nested fields #15

Closed gerryascn closed 4 years ago

gerryascn commented 6 years ago

Great Plugin !!,

I'm trying to implement it to get the afc.gallery.url only but it seems like its not working. www.site.com/wp-json/wp/v2/pages?slug=page-slot?&fields=id,acf.gallery.url and only returns the id property.

@svrooij

svrooij commented 6 years ago

Are you sure the gallery is api there to begin with?

stackprogramer commented 6 years ago

i too when i tested nested features for wordpress it only returns title..........

https://blog.stackprogramer.xyz/wp-json/wp/v2/posts?fields=title.rendered

kadamwhite commented 6 years ago

It won’t handle nesting but the REST API now natively supports a ?_fields= parameter which accepts a comma-separated list

svrooij commented 4 years ago

I'm closing this issue because this plugin is no longer needed in Wordpress. See https://github.com/svrooij/rest-api-filter-fields#deprecated for more details. Or check out the official _fields parameter supported by the wordpress core.

I hope you enjoyed using this plugin, you might want to consider sponsoring