Guest User

Untitled

a guest
Jan 23rd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. function fb_add_body_class( $class ) {
  2.  
  3. if ( ! is_tax() )
  4. return $class;
  5.  
  6. $tax = get_query_var( 'taxonomy' );
  7. $term = $tax . '-' . get_query_var( 'term' );
  8. $class = array_merge( $classes, array( 'taxonomy-archive', $tax, $term ) );
  9.  
  10. return $class;
  11. }
  12. add_filter( 'body_class', 'fb_add_body_class' ); // or post_class as hook
Add Comment
Please, Sign In to add comment