Snippets for Use With WPMU Plugins

I'm thinking this thread here can be use to compile a list of good snippets and tips for use with WPMU Plugins. For example, to call for related posts with a CustomPress post type you can use:

<?php
$tags = wp_get_post_tags($post->ID);

if ($tags) {

$first_tag = $tags[0]->term_id;

$args = array(
'tag__in' => array($first_tag),
'post__not_in' => array($post->ID),
'posts_per_page' => 4, //THE NUMBER OF POSTS YOU WANT TO DISPLAY
'ignore_sticky_posts' => 1, //SETTING TO 1 IGNORES STICKYS
'post_type' => 'YOUR_CPT',//REPLACE THIS WITH YOUR CUSTOM POST TYPE
);

$related_query = new WP_Query($args);

if ($related_query->have_posts()) {
?>
<?php
while ($related_query->have_posts()) : $related_query->the_post();
?>
<div>
<a href="<?php the_permalink() ?>">//LINK TO POST
<?php the_post_thumbnail(array(200,200)); ?>//DISPLAY POST THUMBNAIL
<h4><?php the_title();?></h4>//DISPLAY TITLE
</a>
</div>
<?php
endwhile;
?>
<?php }
wp_reset_query(); // RESET THE LOOP
}
?>

Feel free to share your own below!