0

I'm using REST API, but I have a taxonomy called Ingredients to my Product custom post type. I can create a Product posting to the endpoing /wp-json/wp/v2/produtos, but how can I attach a custom taxonomy (Ingredient) to it?

0
0

You can use the taxonomy name to target it:

...,
ingredient: [121],
....

Where 121 will be the term_id...

1
  • Can you elaborate on how to implement this solution? Where does this code go, what does it look like in a larger piece of functional code?
    – phatskat
    Jun 10 '21 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.