Add metadata when posting with WP API REST
-
Hello,
I would like your help to add metadata when using WP API:
I’m using WordPress REST API to create blog posts and I would like to fill Yoast field using REST API.
Request POST : https://mysite/wp-json/wp/v2/posts/
JSON :
{
“title”: “Your Title”,
“content”: “Your Content”,
“meta”: {
“_yoast_wpseo_title”: “SEO Title”,
“_yoast_wpseo_metadesc”: “SEO Desc”
“_yoast_wpseo_focuskw’”: “my keyword”
}
}
I tried many things but nothing is working ( I tired “meta” “yoast_meta”, and many many)
Maybe I have to create custom api fields, do you have any documentation ?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Add metadata when posting with WP API REST’ is closed to new replies.