Set custom post type and taxonomy terms with Ozh’ Tweet Archiver

I’m a sucker for custom post types, and also for archiving my tweets. [Ozh’ Tweet Archiver](http://planetozh.com/blog/my-projects/ozh-tweet-archiver-backup-twitter-with-wordpress/) hits the sweet spot between form and function; I added this filter to my `functions.php` so that I could keep tweets separate from posts without having to build a new blog.

The `$data[‘tax_input’][‘category’]` sets multiple `category` IDs so that I can assign a tweet to several categories. (Custom post types, even if they have the `category` taxonomy assigned to them, do not work with the `[‘post_category’]` assignment.) This same technique can be used with `post_tag` IDs, using a `$data[‘tax_input’][‘post_tag’]` assignment. Comment out or remove this line if you do not want to fiddle with automatic taxonomy term assignments.


## References

[Ozh’ Tweet Archiver (Backup Twitter With WordPress)](http://planetozh.com/blog/my-projects/ozh-tweet-archiver-backup-twitter-with-wordpress/)

Leave a Reply