Advertisement
eventsmanager

Untitled

Nov 17th, 2013
975
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. <?php
  2. /*
  3. Removes the 'singular' class from the body class attribute on event pages
  4. */
  5. function remove_singular_body_class($wp_classes, $extra_classes) {
  6.   if( em_is_event_page() ) {
  7.     // Filter the body classes    
  8.     foreach($wp_classes as $key => $value) {
  9.       if ($value == 'singular') unset($wp_classes[$key]);
  10.     }
  11.   }
  12.   return $wp_classes;
  13. }
  14. add_filter('body_class', 'remove_singular_body_class', 20, 2);
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement