Skip to content

Instantly share code, notes, and snippets.

@billerickson
Forked from graphicagenda/gist:2154264
Created March 22, 2012 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/2154301 to your computer and use it in GitHub Desktop.
Save billerickson/2154301 to your computer and use it in GitHub Desktop.
Genesis Custom Body Class
<?php
add_filter( 'body_class', 'gk_add_body_class' );
function gk_add_body_class( $classes ) {
$classes[] = 'custom-class';
if ( !empty( $_GET['bg'] ) )
$classes[] = 'bg' . esc_attr( $_GET['bg'] );
return $classes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment