Skip to content

Instantly share code, notes, and snippets.

@graphicagenda
Last active November 29, 2019 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save graphicagenda/2154264 to your computer and use it in GitHub Desktop.
Save graphicagenda/2154264 to your computer and use it in GitHub Desktop.
[Genesis Custom Body Class] #LegacyGISTS
add_filter( 'body_class', 'gk_add_body_class' );
function gk_add_body_class( $classes ) {
$classes[] = 'custom-class';
$classes[] = $_GET['bg'] == 1 ? 'bg1': '';
$classes[] = $_GET['bg'] == 2 ? 'bg2': '';
$classes[] = $_GET['bg'] == 3 ? 'bg3': '';
$classes[] = $_GET['bg'] == 4 ? 'bg4': '';
return $classes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment