• Resolved pembo13

    (@pembo13)


    I’m working with a custom post type (rtcl_listing) and two custom taxonomies (rtcl_category, rtcl_location). I can see the terms set on a given post (show_in_rest = true) but I cannot figure our how to update the terms to new ones via the API.

    I can query the list of terms, etc via the custom tax endpoints. I just want to know how update the custom tax on a given post.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter pembo13

    (@pembo13)

    Developer error. But for anyone looking: add a attribute to the JSON object based on the tax key and pass it a value of IDs

    Can you kindly post an example?

    payload = {
        "title": 'TITLE',
        "content": 'CONTENT',
        'rtcl_category': [10],
    }

    Like this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to set a custom taxonomy term on a custom post type via REST JSON API?’ is closed to new replies.