A couple of weeks ago, I shared a simple gist for how to programmatically add post terms in WordPress. If you’ve read the series on importing CSV files into WordPress, then you’re likely to encounter something like the following scenario:
Given a CSV, apply multiple terms to a single post when the terms are delimited by another character.
So, for example, let’s say that you have a CSV and each value is, naturally, separated by a comma. Within one of the columns, words – or terms, in our case – are delimited by semicolons. Each value that precedes a semicolon represents a term (related to any given taxonomy in the system – this is irrelevant for this particular post).
Adding multiple terms to a post, or post type, is relatively simple and can be based off the functionality already shared.



