Advertisement
idotherest34

body id function

Dec 4th, 2018
194
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( 'genesis_attr_body', function ( $attributes ) {
  2.     if (is_home()) {
  3.  
  4.             $attributes['id'] = 'home';
  5.  
  6.     } elseif (is_singular('department')) {
  7.  
  8.         $attributes['id']' ="in-staff-directory';
  9.  
  10.     } elseif (is_page('all-staff')) {
  11.  
  12.         $attributes['id']' '="in-staff-directory"';
  13.  
  14.     } elseif (is_singular('leadership')) {
  15.  
  16.         $attributes['id']'="in-staff-directory"';
  17.     }
  18. elseif (is_singular('parent-department')) {
  19.  
  20.      $attributes['id']'="in-staff-directory"';
  21.     }
  22. }
  23.  
  24. return $attributes; });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement