I'm pretty much a WP newbie, and I've noticed that in a lot of themes, there is the exact same code for displaying posts in three different places (single.php, archive.php, index.php etc)
This just bugs me. It doesn't seem right to me, a programmer always trying to code as efficiently as possible.
What is the best way to generalize the layout for posts, preferably as a WordPress integrated/native function?
get_template_part(). – Michael Aug 23 '11 at 19:27