Last active
September 6, 2017 22:34
-
-
Save itsfreddyrb/9d17d2eaa391aa305bff41ee3c01f3ed 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
add_filter( 'body_class', function($classes) { | |
global $post; | |
$terms = get_the_terms($post->ID, 'project_category'); | |
foreach( $terms as $term ) { | |
$supertax[] = $term->name; | |
} | |
return array_merge( $classes , $supertax ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment