Hi, I have a static navigation that shows something like this:
<ul id="main_menu">
<li <?php if (is_page('home') ) { echo ' class="current"'; } ?>><a href="<?php bloginfo('url');?>/home"><span>Home</span></a></li>
<li <?php if (is_page('structure') || is_page('child_of=9') ) { echo ' class="current"'; } ?>><a href="<?php bloginfo('url');?>/structure"><span>Structura</span></a>
<ul>
<?php wp_list_pages('child_of=9&title_li='); ?>
</ul>
</li>
<li <?php if (is_page('contact') ) { echo ' class="current"'; } ?>><a href="<?php bloginfo('url');?>/contact"><span>Contact</span></a></li>
</ul>
I use php code to echo class current to the li when I am on that specific page, as you can see in the code.
The "Structure" section displays the children pages dinamically. I tried to use the same code:
is_page('child_of=9') where 9 is the id of the parent page but it doesn't works.
What I try to accomplish, is echo class current to the li of the parent page, while on any of its subpages.
Thanks for help.