Hello team and community.
I have a little problem with my wordpress automation.
As soon as I want to create an article automatically on wordpress. I want to add 2 categories. A parent category and a child category.
However, when publishing, only the child category is linked to the article.
I’ve tried adding the 2 categories directly to the input, but it doesn’t work.
Par ailleurs lors de la création de la catégorie “enfant”, je précise la catégorie parente :
Thx for you help if you already have this problem.
According to the Wordpress API for Create a Post, it needs to be an array.
When you are using “Map” for a field, you are responsible for ensuring the value is exactly as required. However, the Wordpress API documentation doesn’t tell you that you can also pass a comma-separated text string of category IDs:
So all you need to do is put a comma in-between them
I do this too but not working and “;” also Sorry i miss communication.
Hmm. Weird, try sending an actual array then. You’ll need to use the
add() built-in function with the first item as
Works very well really thanks buddy !
No problem, glad I could help!
In future, please create a new thread for each question. This makes it easier for others with the same problem to search for the answer. Thank you for your cooperation!
The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.
This marks the topic as solved, so that:
- others can save time when catching up with the latest activity here, and
- allows others to quickly jump to the solution if they come across the same problem
To do this, simply click the checkbox at the bottom of the post that answers your question: