help with adding ID to wp_list_pages()
-
Hi, I’m trying to create dynamic menu highlighting to a theme I’m working with. Right now the following code generates the navigation:
<ul> <li<?php if (is_home()) { echo " id=\"current\"";}?>><a href="<?php echo get_settings('home'); ?>">Home</a></li> <?php wp_list_pages('title_li=&depth=1'); ?> </ul>
As you can see I was able to add dynamic menu highlighting to the homepage link, but how would I add this too the rest of the dynamically generated page links? Can I add something to “wp_list_pages(‘title_li=&depth=1’)” in order to add the id=”current” to the currently selected page?
Thanks in advance. I’m new to wordpress and just figuring our my way around…
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘help with adding ID to wp_list_pages()’ is closed to new replies.