Last active
December 23, 2017 11:48
-
-
Save kamalinfo/6a317b38947eb5f89b2c7a73e78b15c1 to your computer and use it in GitHub Desktop.
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 | |
function themename_body_classes( $classes ) { | |
// body calss for page | |
if ( is_singular( 'page' ) ) { | |
global $post; | |
$classes[] = 'page-' . $post->post_name; | |
} | |
return $classes; | |
} | |
add_filter( 'body_class', 'themename_body_classes' ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment