Skip to content

Instantly share code, notes, and snippets.

@BoweFrankema
Created December 12, 2014 10:35
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 BoweFrankema/9b7a9a2c1e622923ee16 to your computer and use it in GitHub Desktop.
Save BoweFrankema/9b7a9a2c1e622923ee16 to your computer and use it in GitHub Desktop.
Add a body class when the page is NOT a BuddyPress page
<?php
/**
* Add class when it's not a BuddyPress page
*/
function cfc_base_wordpress_page( $classes )
{
if ( ! is_buddypress() ) {
$classes[] = 'wordpress-page';
}
// return it!
return $classes;
}
add_filter( 'body_class', 'cfc_base_wordpress_page' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment