Create ACF Object Using REST API
-
In this documentation: https://www.advancedcustomfields.com/resources/wp-rest-api-integration/#request-methods it mentions three REST methods:
- GET to view data
- OPTIONS to request schema
- POST to update ACF fields
The POST method requires an ID of an already-created object –
{ID}
in the following:apiFetch( { path: '/wp/v2/book/{ID}',
But what if I don’t already have an ID? Is it possible to create a new ACF object (a new book in this case) instead of modifying an existing one? I want to populate my site with a bunch of historical data, and the API seems like the easiest way to do that, but only if I can create new objects.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Create ACF Object Using REST API’ is closed to new replies.