Title: Problem displaying different banner for child page
Last modified: August 19, 2016

---

# Problem displaying different banner for child page

 *  Resolved [creativecheetah](https://wordpress.org/support/users/creativecheetah/)
 * (@creativecheetah)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/displaying-different-banner-using-headerphp-array-function/)
 * Hi. I am having a small issue with a parent and child page display. In the php
   code below, the first function (87) tells the parent page to display the flash
   banner ‘information.swf’. And it works just as I want it to. 🙂
 * However, I have a child page (sub page) which I would like to display a different
   banner. I thought I could use the same function, using the child page number 
   and name (i.e. 6 and ‘car-parking’.)
 * All that displays is the parent ‘information’ banner. I then took out the function
   for the main page, leaving just the child page, and the function worked prefectly
   for it.
 * So the problem seems to be that the main page function, ‘information’, applies
   the function to each child page, even if a different function is applied for 
   the child page.
 * Any help with this would be greatly appreciated.
 *     ```
       <?php } elseif ( in_array(87, $all_ancestors) || is_page('information')  ) { ?>
   
           <div id="image_info">
           [kml_flashembed movie="http://meadowlane.vpswalkercommunications.co.uk/wp-content/themes/meadowlane_v2/img/information.swf" width="915" height="230" fversion="9" useexpressinstall="true" /]
       </div>
   
       <?php } elseif ( in_array(6, $all_ancestors) || is_page('car-parking')  ) { ?>
   
           <div id="image_info_parking">
           [kml_flashembed movie="http://meadowlane.vpswalkercommunications.co.uk/wp-content/themes/meadowlane_v2/img/shops.swf" width="915" height="230" fversion="9" useexpressinstall="true" /]
       </div>
   
       <?php } elseif ( in_array(5, $all_ancestors) || is_page('location')  ) { ?>
   
           <div id="image_info">
           [kml_flashembed movie="http://meadowlane.vpswalkercommunications.co.uk/wp-content/themes/meadowlane_v2/img/shop_mobility.swf" width="915" height="230" fversion="9" useexpressinstall="true" /]
       </div>
       ```
   

Viewing 1 replies (of 1 total)

 *  Thread Starter [creativecheetah](https://wordpress.org/support/users/creativecheetah/)
 * (@creativecheetah)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/displaying-different-banner-using-headerphp-array-function/#post-1180364)
 * ok I got this working. Realised that the child function needed to come _before_
   the parent function. Makes full sense now! Hopefully this is helpful to others.
   🙂

Viewing 1 replies (of 1 total)

The topic ‘Problem displaying different banner for child page’ is closed to new 
replies.

## Tags

 * [child](https://wordpress.org/support/topic-tag/child/)
 * [header.php](https://wordpress.org/support/topic-tag/header-php/)
 * [in_array](https://wordpress.org/support/topic-tag/in_array/)
 * [parent](https://wordpress.org/support/topic-tag/parent/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [creativecheetah](https://wordpress.org/support/users/creativecheetah/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/displaying-different-banner-using-headerphp-array-function/#post-1180364)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
