Add custom body class

<?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' ] );
} );
view raw functions.php hosted with ❤ by GitHub

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *