How do i use WP REST API to fill Yoast meta data ?

[ad_1]

Hello,

I would like your help on the following matter:

I’m using WordPress REST API to create blog posts and I would like to fill Yoast field using REST API. Based on WP documentation, here’s a sample of the code:

Request POST sur /sites/$site/posts/new

‘title’: article_title,
‘content’: article_content,
‘metadata’: {
‘yoast_wpseo_focuskw’: article.focus_keyword,
‘yoast_wpseo_title’: f”Test du 10/10/2010: %%title%%”,
‘yoast_wpseo_metadesc’: “%%excerpt%%”
}

Nothing seems to work.

We tried intalling REST API plugin, but stil doesn’t work.

Do you have any idea of what we can do ?

Thank you very much,

Sincerly,

Chris

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer