Advertisement
alchymyth

twenty eleven child functions addendum for sidebar page

Aug 29th, 2011
893
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. add_filter('body_class', 'adjust_body_class', 20, 2);  
  2. function adjust_body_class($wp_classes, $extra_classes) {
  3.  
  4. if( is_page_template('sidebar-preinsulated.php') ) :
  5. // Filter the body classes    
  6.        
  7.       foreach($wp_classes as $key => $value) {
  8.       if ($value == 'singular') unset($wp_classes[$key]);
  9.       }
  10.      
  11. endif;
  12. // Add the extra classes back untouched
  13. return array_merge($wp_classes, (array) $extra_classes );
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement