Posted By

wpCanyon on 11/17/10


Tagged

wordpress


Versions (?)

Adding Classes to body_class() in WordPress


 / Published in: PHP
 

URL: http://wpcanyon.com/tipsandtricks/adding-classes-to-body_class-in-wordpress/

  1. add_filter('body_class','additional_body_classes');
  2.  
  3. function additional_body_classes($classes) {
  4. $classes[] = 'class-i-need';
  5. $classes[] = 'another-additional-class';
  6. $classes[] = 'third-class';
  7. return $classes;
  8. }

Report this snippet  

You need to login to post a comment.