MITLibraries / headless_wordpress

Run away! This is experimental and not intended to be used for anything.
Apache License 2.0
0 stars 0 forks source link

Look into custom fields via API #2

Open JPrevost opened 7 years ago

hllavina commented 7 years ago

The definition of custom post types can be modified to expose them in the rest api https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-rest-api-support-for-custom-content-types/

for example , the exhibits and event custom post types can have 'show_in_rest' as true (done in dev)

exposing custom field created by ACF plugin available (tested on dev) https://wordpress.org/plugins/acf-to-rest-api/ output http://libraries-dev.mit.edu/exhibits/wp-json/wp/v2/exhibits

Pagination - https://developer.wordpress.org/rest-api/using-the-rest-api/pagination/