Currently we are developing a new social blogging theme. What we need is to automatically assign a category to a certain post format. For example,we want all posts under ‘Image’ to be assigned with the category ‘pictures’.

Here is the code we will be using: