I'm currently writing my first plugin, which will let the site admin/editor use a different image as a background/header for each post/page, and I would also like to have defaults for each category.

Here is where I'm not sure how to proceed: If for each post/page the image (which is an attachment, so is just an id in the db) is a simple post meta field, there is no such (implicit) thing for categories.

So there are more ways to go:

Create an option for every category - something like background_cat_$id_

Add the categories which correspond to a certain image to the attachment post ( corresponding_cats ? )

You're on the right track though. Until we have a taxonomy meta table then the options table is the tidiest solution. You could always create a taxonomy meta table yourself with the plugin though and make some get/set functions to go with it.

Your other answer seems really insightful and helps me with some other questions I had, but I'm still interested in some other points of view so I won't accept your answer quite yet :)
–
CroncoJan 17 '11 at 14:19

np. I'd be interested to see if anyone has implemented a taxonomy meta table myself. Seems like a worthy plugin to write. Hopefully my next project at work will cover the dev time.
–
sanchothefatJan 17 '11 at 14:30