diff --git a/functions.php b/functions.php index 324bcb5..8ad0c6d 100644 --- a/functions.php +++ b/functions.php @@ -190,3 +190,14 @@ function dxstarter_remove_html_margin() { remove_action( 'wp_head', '_admin_bar_bump_cb' ); } add_action( 'get_header', 'dxstarter_remove_html_margin' ); + +//Page Slug Body Class +function add_slug_body_class( $classes ) { + global $post; + if ( isset( $post ) ) { + $classes[] = $post->post_type . '-' . $post->post_name; + } + return $classes; +} +add_filter( 'body_class', 'add_slug_body_class' ); + \ No newline at end of file