Advertisement
dalbeck

Wordpress conditional functions display specific headers

Aug 17th, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.87 KB | None | 0 0
  1. <section id="banner">
  2.  
  3.     <?php if (is_tree('23')) { ?> <!-- Custom function to call all pages under the Contact Page to show specific header graphic -->
  4.  
  5.         <img src="/wp-content/uploads/2012/05/bannerContact.jpg" alt="" />
  6.  
  7.     <?php } else { ?>
  8.    
  9.     <?php if (is_page(21) || $post->post_parent=="21") { ?> <!-- Custom function to overwrite Insurance header graphics so they do not share the header graphic from  Education -->
  10.    
  11.         <img src="/wp-content/uploads/2012/05/bannerInsurance.jpg" alt="" />
  12.        
  13.     <?php } else { ?>  
  14.  
  15.     <?php if (is_tree('19')) { ?> <!-- Custom function to call all pages under the Education Page to show specific header graphic -->
  16.  
  17.         <img src="/wp-content/uploads/2012/05/bannerEdu.jpg" alt="" />
  18.  
  19.     <?php } else { ?>  
  20.  
  21.         <?php the_post_thumbnail('featured-image',  980, 185, true); ?>
  22.  
  23.     <?php } ?> <?php } ?> <?php } ?>
  24.  
  25. </section><!--end of slider-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement