Adding Multiple Post Terms

Here’s a great post from Tom McFarlin on adding multiple post terms to a single post. Tom writes about it in the context of importing a lot of post data from a CSV file, and having a bit of code that looks something like this:


So how to get red, blue, and white onto the product_color taxonomy for the mittens post all at once? Tom’s got your answer. The code itself could be used in a range of situations, so take a look! Also recommended as a good way to check your understanding of how taxonomies work, and what “taxonomies” and “terms” really mean.

Add a Comment

Your email address will not be published. Required fields are marked *