PDA

View Full Version : Wordpress Parent/Child Dropdown Nav



ksharpesays
12 May 2010, 03:37 PM
Hey - I am a newbie when it comes to PHP/CSS and I am constructing a relatively simple site for a friend of mine's company. My progress so far can be seen at http://leafkids.org ... He's asking me for two things that have proved difficult for me but might be simple for anyone more advanced then myself which I'm assuming is the majority of members here.
His first request is he wants Subpage/Child Pages for certain pages to appear in a vertical list below the Parent page. I was reading this tutorial http://www.cssnewbie.com/easy-css-dropdown-menus/ and though clearly worded I don't know where to apply it in the pages CSS, with the different classes and what not used.


The second thing he is looking for is different header images on each page, and I was able to find this code to use as a sample for SPECIFIC HEADERS ON DIFFERENT PAGES:




<?php if (is_page('28')) { ?>

<img src="<?php bloginfo('template_url'); ?>/headers/image1.jpg" width="920" alt="<?php bloginfo('name'); ?> header image" />

<?php } elseif (is_page('26')) { ?>

<img src="<?php bloginfo('template_url'); ?>/headers/image2.jpg" width="920" alt="<?php bloginfo('name'); ?> header image" />

<?php } elseif (is_page('30')) { ?>

<img src="<?php bloginfo('template_url'); ?>/headers/image3.jpg" width="920" alt="<?php bloginfo('name'); ?> header image" />

-------------BELOW IS RANDOMIZED HEADERS---------------------

<?php } else { ?>

<img src="<?php bloginfo('template_url'); ?>/rotating.php?image=<?php echo mt_rand(0,100); ?>" width="920" alt="<?php bloginfo('name'); ?> Rotating Header Image" title="<?php bloginfo('name'); ?> Random Header Image" />

<?php } ?>



But am having trouble with what I'd need to change in that to make it work for me as well.