Title: display third level navigation SOLVED
Last modified: August 20, 2016

---

# display third level navigation SOLVED

 *  Resolved [mattyscribs](https://wordpress.org/support/users/mattyscribs/)
 * (@mattyscribs)
 * [14 years ago](https://wordpress.org/support/topic/display-third-level-navigation-solved/)
 * I had trouble displaying 3rd level navigation menus to display as sperate nav
   components and worked it thusly:
 *     ```
       <?php if(count(get_post_ancestors($post->ID))>1){?>
       <ul id="subsubnav">
       	<?php wp_list_pages("title_li=&child_of=".$post->post_parent."&depth=1" );?>
   
       <?php }?>
       ```
   
 * _[Moderator Note: Please post code or markup snippets between backticks or use
   the code button.]_
 * Could be used for any level of navigation I guess, just change the count test
   in the if statement. I am displaying 2nd and 3rd level nav systems on subpages,
   the full code for both is:
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   The maximum number of lines of code that you can post in these forums is **ten
   lines**. Please use the [pastebin](http://wordpress.pastebin.com/)]_
 * Thought this might be helpful to others 🙂 Seems pretty efficient too.

The topic ‘display third level navigation SOLVED’ is closed to new replies.

## Tags

 * [3rd level](https://wordpress.org/support/topic-tag/3rd-level/)
 * [navigation](https://wordpress.org/support/topic-tag/navigation/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [mattyscribs](https://wordpress.org/support/users/mattyscribs/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/display-third-level-navigation-solved/)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
