Dynamic Menu where each menu item is styled differently
-
$menu = array( 'menu' => 'Main Menu', 'echo' => true, 'before' => '<li>', 'after' => '</li>', 'link_before' => '<span>', 'link_after' => '</span>' );
This works well with creating my dynamic menu — however I want the ‘before’ tag to be <li class = “current”> for the menu item of the current page.
I can get the current page and determine if it’s the current page, but how do I/is it possible to change one ‘before’ given a condition here?
I’m thinking I’d have to overwrite this array after the fact, but I haven’t started yet — would that work? If so, any tips?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Dynamic Menu where each menu item is styled differently’ is closed to new replies.