Advertisement
alchymyth

child twenty eleven functions single sidebar

Jun 26th, 2012
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  1. add_filter('body_class', 'blacklist_body_class', 20, 2);
  2. function blacklist_body_class($wp_classes, $extra_classes) {
  3. if( is_single() ) :
  4. // Filter the body classes, and remove 'singular' when single post
  5.     if (!in_array('singular', $wp_classes)) : continue;
  6.     else:
  7.       foreach($wp_classes as $key => $value) {
  8.       if ($value == 'singular') unset($wp_classes[$key]);
  9.       }
  10.     endif;
  11. endif;   // Add the extra classes back untouched
  12. return array_merge($wp_classes, (array) $extra_classes);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement