Title: Adding dynamic subnav class
Last modified: August 19, 2016

---

# Adding dynamic subnav class

 *  [jamble](https://wordpress.org/support/users/jamble/)
 * (@jamble)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/adding-dynamic-subnav-class/)
 * 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”>
    - <ah href=”#”>Link
    - <ah href=”#”>Link
 *  - <ah href=”#”>Link
 *  - <ah href=”#”>Link
    -  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,

Viewing 1 replies (of 1 total)

 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/adding-dynamic-subnav-class/#post-1246597)
 * This plugin lets you add a classname to any page.
    [http://www.technokinetics.com/plugins/page-lists-plus/](http://www.technokinetics.com/plugins/page-lists-plus/)

Viewing 1 replies (of 1 total)

The topic ‘Adding dynamic subnav class’ is closed to new replies.

## Tags

 * [Subnav](https://wordpress.org/support/topic-tag/subnav/)
 * [wp_list_pages](https://wordpress.org/support/topic-tag/wp_list_pages/)

 * 1 reply
 * 2 participants
 * Last reply from: [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/adding-dynamic-subnav-class/#post-1246597)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
