default post thumbnail and category if there is no thumbnail and category
I suggest that you install FPW Category Thumbnails plugin. It will cover every scenario mentioned in your question. It will save you from maintaining code in functions.php, and will do it visually! The built-in FPW Post Thumbnails will add very powerful styling to your featured images (borders, shadows, margins, backgrounds, etc). You will be able … Read more