Custom post types are pretty neat. By putting the following code (kindly taken from WPRecipes) in your functions.php, you can include all post types in your blog page:
That's great, but what if I want all of my post types to be shown on my blog page but look slightly different. Well, you can use
get_post_type to do exactly that.
get_post_type requires a post ID to be supplied, so you can use
<?php get_post_type(get_the_ID()); ?> inside the loop to check against the current posts' post_type.
You can echo that code inside your post class to allow changes on a purely CSS level, by targeting the my_post_type class. However, if you want to go all crazy and have a completely different output for each post, you could do something like this inside your loop:
And viola! You now have completely customisable post type displays, all in the single loop.