Adding Classes to body_class() in WordPress


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  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. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.