I'v been trying to figure out how to set meta tags using the Node JS WPAPI (which feels outdataed) WP library, but cant get it working.
For example, how would you add the <meta property="description" content="content" /> tag to the HTML of a WordPress Post programmatically using WPAPI or the WP Rest API?
Here is some code, which creates the post successfully, but no new meta tags are added to the HTML when I inspect the post:
const postOptions = {
title: "Post Title",
content: "<h1>Heading</h1>",
status: "draft",
meta: {
description: 'A discription',
}
}
const client = new WPAPI(config);
const post = client.posts().create(postOptions);