Skip to content

Instantly share code, notes, and snippets.

@craigsimps
Last active March 15, 2018 13:44
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 craigsimps/f40eaf0c30c9d1de75778a5c2f9963da to your computer and use it in GitHub Desktop.
Save craigsimps/f40eaf0c30c9d1de75778a5c2f9963da to your computer and use it in GitHub Desktop.
<?php
/**
* Add custom body class.
*
* @param array $classes Array of existing body classes.
*
* @return array
*/
add_filter( 'body_class', function( $classes ) {
return array_merge( $classes, [ 'custom-body-class' ] );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment