Forums
Forums / Plugins / Adding dynamic subnav class
(@jamble)
16 years, 7 months ago
Anyone know how I can modify the standard WP nav:
<?php wp_list_pages(‘sort_column=menu_order&title_li=&depth=2’); ?>
So that it outputs a class on any sub pages?
At the moment I get this:
<ul id=”nav”>
I just want to add a class of subnav to the second level ul but I can’t find out how to do it without hardcoding a nav. Any ideas folks?
Cheers,
(@stvwlf)
This plugin lets you add a classname to any page. http://www.technokinetics.com/plugins/page-lists-plus/
The topic ‘Adding dynamic subnav class’ is closed to new replies.