Add meta box to page or post

function mw_member_add_meta_box( $page, $context ) {
if ( ( 'page' === $page || 'post' === $page ) && 'advanced' === $context )
add_meta_box( 'mw-member-levels', 'Member Levels', 'mw_select_member_level', $page, 'advanced', 'low' );
}

Register admin stylesheet

//Register CSS for Admin Pages
function admin_register_head() {
$admin_css_url = get_bloginfo('stylesheet_directory') . '/css/admin.css';
echo "<link rel='stylesheet' type='text/css' href='$admin_css_url' />n";
}
add_action('admin_head', 'admin_register_head');

Embed swf object

<object type="application/x-shockwave-flash" data="/swf/myMovie.swf" width="700" height="322">
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="6.0.65.0" />
<param name="expressinstall" value="scripts/expressInstall.swf" />
<param name="movie" value="/swf/myMovie.swf" />
</object>

Limit post number of words

<?php //This block is for your functions.php file

function hyp_limit_words($string, $word_limit)
{
$words = explode(' ', $string, ($word_limit + 1));
if(count($words) > $word_limit)
array_pop($words);
return implode(' ', $words);
}
?>

<!-- The rest is for the archive.php file -->
<?php $shortened_content = get_the_content(); ?>
<?php echo hyp_limit_words($shortened_content,60) . ' [...]&nbsp;&nbsp;&nbsp;'; ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Read: <?php the_title_attribute(); ?>">Read Full Post</a>

Display child thumbnails

<? query_posts('post_type=page&post_parent=7'); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div id="page-content">
<a href="<? the_permalink(); ?>"><?php the_post_thumbnail( 'thumbnail' ); ?></a>
</div>
<? endwhile; else: endif; wp_reset_query();?>

Shuffle custom fields

<?
$meta = get_post_custom_values("CustomFieldName");
$metas = shuffle($meta);
$count = 0;
foreach ($meta as $m) {
$m = explode(", ", $m);
echo "<div>";
echo "<a href="" . $m[1] . "" target="_blank">";
echo "<img src="/wp-content/uploads/" . $m[2] . "" width="100">";
echo "</a>";
echo "</div>";
$count++;
if ($count == 12) break;
}
?>

Check parent ID

if ($post->post_parent) {
$ancestors=get_post_ancestors($post->ID);
$root=count($ancestors)-1;
$parent = $ancestors[$root];
} else {
$parent = $post->ID;
}