Wordpress API calls tags / cats updates

Hi all, I update the tags through API call as I can’t manage directly when adding the post

I found this method

in body of the JSON

{
“tags”: “1,2,3”
}

any idea for the categories how to update ?

Hey there,

which API are you referring to? And what tags are you updating there?

Hi i’m refering to make Wordpress API module. I found for categories , “categories” should be

Welcome to the Make community!

Yes, you can add tags and categories when creating a new Wordpress post.

You’ll need to split the tags/categories by comma-space so that it becomes an array.

Then, use an iterator on the array so that you can process each category at a time.

Create new category using the name.

Then, if category exists, there will be an error. Handle the error by searching for the category, and resuming with the existing category ID.

Then, aggregate the category IDs into an array using the Array Aggregator.

You can then insert the array of category IDs into the tag/category field.

Similarly, this works the same way for the Wordpress Tags field.

For more information, see How to deal with WordPress errors

Hope this helps! If you are still having trouble, please provide more details.

@samliew