manifest / integrations / wp-api-manipulate-meta
Manipulate Meta with the WP API
Adds routes to the REST API to read, write, and delete post and term meta values separately from posts.
by Corey Salzano · github.com/csalzano/wp-api-manipulate-meta · website
★ 5stars
2forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/csalzano/wp-api-manipulate-meta/archive/refs/heads/master.zipFrom the readme
Manipulate Meta with the WP API
This is a WordPress plugin. It adds routes to the REST API to read, write, and delete post and term meta values separately from posts and terms.
Why though?
As of this writing, it is not possible to delete a meta value using the WordPress REST API. Post meta updates must be communicated while inserting and updating whole post objects, and the only way to remove meta fields from a post is to write blank values. This plugin allows one request to retrieve, update, or delete a meta field independently from a post object. It also allows one request to bulk delete meta fields by accepting an array of meta keys as a parameter.
How?
Read, Write, or Delete a Single Meta Value
Use GET, POST, or DELETE verbs with an endpoint like this:
https://example.test/wp-json/wp/v2/{posttype}/{postid}/meta/{metakey}
...or like this for term meta:
https://example.test/wp-json/wp/v2/{taxonomy}/{termid}/meta/{metakey}
When writing a value with POST, use a JSON body to specify the value:
Bulk Delete Meta Values
Use the DELETE verb with an endpoint like this:
https://example.test/wp-json/wp/v2/{posttype}/{postid}/meta
...or like this for term meta:
https://exampl
Read the full README on GitHub →
Releases
| Tag | Published |
|---|---|
| v1.4.5 | Sep 8, 2023 |
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.