node-wpapi icon indicating copy to clipboard operation
node-wpapi copied to clipboard

Create custom post with taxonomy and post meta ?

Open simon-tannai opened this issue 8 years ago • 1 comments

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 ?

simon-tannai avatar Sep 10 '17 22:09 simon-tannai

For meta, read my comment at #280.

dimadin avatar Oct 25 '17 13:10 dimadin