Today, my blog will have a post type it has never had before. This being a CODE SNIPPET!
Today I was fooling around with a WordPress site from a client that wanted the page listing their blog posts to have some thumbnails be small with text wrapping around them, and others just to take up the entire allotted space. Here is the code I came up with:
<?php if( in_category(’11’) ) {
the_post_thumbnail(‘big-thumbnail’);
} else {
the_post_thumbnail(‘small-thumbnail’);
} ?>
What this does is look for every post that is in category 11 first, and then assigns the post thumbnail I created specifically for it. If the post is not in this category, then it goes to the default small one.