I have wondered about the web and came across this beautiful piece of code:
if(has_post_thumbnail()){
the_post_thumbnail();
}else{
echo '<img src="' . get_bloginfo('template_directory') . '/images/default_post_thumb.jpg" />';
}
What it does, is adds a default thumbnail to every single post. That's good for a portfolio blog, but what if I have loads of categories, e.g. one category is tutorials and another is music - I must have different default thumbnails for those categories.
Can anybody please explain to me how I can customize this code to show different default thumbnails for different categories?
Thanks :)