my 2p menu

It may not be the ‘correct’ way to add a dropdown menu to Wordpress, but I thought I would see how difficult it would be to manually add a dropdown menu based on http://www.cssplay.co.uk/menus/elegant2.html.
So the ‘my 2p menu’ is now installed across the top of this theme.
All that is required is to take the menu structure from the CSSplay web page and the stylesheet which is saved in the same directory as your web theme.
Add the menu structure to the header.php file in the position you would like it to appear and update the structure to fit your links.
Ensure that the conditional comments are kept in the correct places.
I used the links from my sidebar to populate the dropdowns and added the search form to the right of the menu bar.
The structure of the conditional comment is:
Position 1
<li><a href=”….”>Link Text<!–[if gte IE 7]><!–></a><!–<![endif]–>
<!–[if lte IE 6]><table><tr><td><![endif]–> Position 2
<ul>
<li><a href=”….”>Link Text</a></li>
<li><a href=”….”>Link Text</a></li>
</ul>
<!–[if lte IE 6]></td></tr></table></a><![endif]–> Position 3
</li>

Position 1 : AROUND the closing link tag. NOTE this is a special CSSplay form of the MS conditional comments and does more than at first sight.
Position 2 : BEFORE the opening inner <ul> tag
Position 3 : AFTER the closing </ul> tag

5 Responses to “my 2p menu”

  1. Javier Centeno Says:

    Did you know your menus are not working ont IE6 now?? I don’t know what happened but it seems like they just stopped working

  2. Administrator Says:

    They are working in my copy of IE6. If you are using a standalone version them this is the problem.

  3. Leo Kimble Says:

    I used one of your methods for buiilding menus and also integrated it on a wordpress installation.

    http://www.extremetrampoline.co.nz/cms/

    I definately think that you should perhaps release your own wordpress plugin because the current selection for drop down menus aren’t very good

  4. Nick Says:

    I’ve used one of your menus on my wordpress site.
    (http://kainielsen.web44.net)
    I haven’t built in the sidebar elements - I find PHP rather alrming !

    There is someone who has made a WP plugin citing your CSS

    http://wordpress.org/extend/plugins/wordpress-css-drop-down-menu/

    and here

    http://www.zackdesign.biz/

  5. Tim Driver Says:

    Stu - thanks for this - I have found your CSS articals inspiring over the last 2 years and I’m just starting a wordpress project so wil have a play with the menu code

    Thanks
    Tim

Leave a Reply