Last active
June 1, 2017 08:33
-
-
Save taninbkk/3e4a4fc2ed53540c889f3f7c9bc8f7db to your computer and use it in GitHub Desktop.
add custom class to wordpress body class (woocommerce shop page)
This file contains hidden or 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
add_filter( 'body_class', 'custom_class' ); | |
function custom_class( $classes ) { | |
if (is_shop()) { | |
$classes[] = 'shop'; | |
} | |
return $classes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment