Skip to content

Instantly share code, notes, and snippets.

@cdils
Created April 7, 2014 00:43
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 cdils/10013226 to your computer and use it in GitHub Desktop.
Save cdils/10013226 to your computer and use it in GitHub Desktop.
Use body class as a conditional
<?php //remove this line
function conditionl_widgets() {
$classes = get_body_class();
// If body class doesn't include 'full-width-content', BOUNCE
if in_array( 'full-width-content', $classes) {
return;
}
// do stuff
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment