Skip to content

Instantly share code, notes, and snippets.

@itsfreddyrb
Last active September 6, 2017 22:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itsfreddyrb/9d17d2eaa391aa305bff41ee3c01f3ed to your computer and use it in GitHub Desktop.
Save itsfreddyrb/9d17d2eaa391aa305bff41ee3c01f3ed to your computer and use it in GitHub Desktop.
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