• Resolved creativecheetah

    (@creativecheetah)


    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="https://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="https://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="https://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

    (@creativecheetah)

    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.