Created
April 7, 2014 00:43
-
-
Save cdils/10013226 to your computer and use it in GitHub Desktop.
Use body class as a conditional
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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