Tag archive for "category"
Run the filter whenever you want your post type in the main loop. Add is_home(), is_category() etc. Example is for the post type 'paste'. more
There's obviously a little context missing for this paste, but the basic idea should be clear ;-) more
The function should probably check if the post already has the tag/category before adding it a second time. I should probably look into the wp_is_post_revision() part again as well. more