Guest User

Untitled

a guest
Dec 9th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. $post = $wp_query->post;
  2.  
  3. if ( in_category('new', $post->ID) ) { ?>
  4. <body <?php body_class('new'); ?>>
  5. <?php
  6. }
  7.  
  8. elseif ( in_category('featured', $post->ID) ) { ?>
  9. <body <?php body_class('featured'); ?>>
  10. <?php
  11. }
  12.  
  13. else { ?>
  14. <body <?php body_class('class-name-generic'); ?>>
  15. <?php
  16. }
  17. ?>
Add Comment
Please, Sign In to add comment