Dynamic menu *and* submenu highligthing
-
hi all,
would appreciate some help getting the menus on a new site working. I know what I want to do, I know the CSS to use, and I think I know which php tags to use, but my php skills are not good enough yet to actually get it working ??
basically I’ve got a site (norwegian only) with a top menu and a submenu. I have got the dynamic hightlighting working for the top menu using the dynamic menu highligthing tutorial from the Codex, but now I want this for the submenus too.
In short, I want the page to work the exact same way as www.remarpro.com is: if you press “about” then “about” and “intro” on the sidebar is highlighted, if you press “requirements” on the sidebar that (and still “about”) is highlighted etc.
So, first problem: I want to just extract the subpages to a parent pages when on that parent page, this can be done using
<?php wp_list_pages('child_of=X') ?>
– but what i need to do is a loop (?) that says when on page 5 extract only subpages to 5, when on 6 only subpages to 6 etc – this is probably very trivial, but also where my lack of php skills prevents me to get it working!second problem: get the highlighting to work on this. I guess it should be something like: “when on a subpage to X, highlight X *and* the actual subpage”. anyone know the right approach?
(another thing: the Codex says that if you use
<?php wp_list_pages('title_li='); ?>
the links will not get no heading and not be wrapped in UL and LI tags – it doesn’t get any heading, but still wrapped in LIs… this isn’t exactly a problem, but strange.)..and of course: my ways of thinking might not be that smart after all, if anyone has a different approach to getting menu and submenu highligthing work (as on www.remarpro.com) please tell! I’ve been googling, searching the forums and the codex but nothing has come up.
ok, enough so far ?? BTW, I just starting experimenting with WP for these kinds of projects after two years with Movable Type, and am mighty impressed!
all help appreciated! cheers,
Vegard
- The topic ‘Dynamic menu *and* submenu highligthing’ is closed to new replies.