follow mejoin mesubscribe

Page Depth Body Class for WordPress

Assumes that your page depth is how the pages are organized in the page hierarchy, not custom menu hierarchy

 * Add page depth body class.
 * Adds depth-x body class
 * @author Jen Baumann
 * @link
function depth_body_class($classes) {
	global $post;
	if (is_page()) {
	    if ($post->post_parent)	{
        	$ancestors = get_post_ancestors($post);
			$depth = count($ancestors) + 1;
        } else {
        	$depth = 1;
        $classes[] = 'depth-' . $depth;
	return $classes;

Add a Print Style Sheet to your Genesis Child Theme

The way a website prints is not necessarily how you want it to look. The good news is you can control it easily by adding a print stylesheet to your Theme. Don't forget to create a file called print.css in your child theme folder. … Read More

Disable the WordPress 3.1 Admin Bar

The WordPress Admin Bar may be useful but has the potential to disrupt the frontend display of your site while logged in if you are using a background image. To disable the WordPress Admin Bar which is a new feature in WordPress 3.1, place this code in your theme functions.php file. This code snippet does 2 things: Disables the Admin Bar Removes the Admin Bar user options from the edit … Read More