node-wpapi
node-wpapi copied to clipboard
Create custom post with taxonomy and post meta ?
Hello,
I'm trying to make an automate to create custom post with taxonomy and post meta. But I did not found any documentation about this. I use the auto-discovering method and my custom post methods and custom taxonomy methods are returned.
I created taxonomy:
wp.property_type().create({name: 'house'}).then((type) => {
console.log(type)
}
And a custom post:
const options = {
title: 'Test title',
content: 'something',
status: 'publish',
}
wp.property().create(options)
.then((property) => {
// Custom post created
})
So, how I can create a custom post and attach to him custom taxonomy and post meta ?
For meta, read my comment at #280.