Title: The Ultimate Sidebar Navigation
Last modified: August 19, 2016

---

# The Ultimate Sidebar Navigation

 *  [Jonathan Goldford](https://wordpress.org/support/users/jg-visual/)
 * (@jg-visual)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/the-ultimate-sidebar-navigation/)
 * Hi,
 * I am looking for someone to help me with the ultimate sidebar navigation. Here
   is the layout:
 * Top Level Page 1
    Top Level Page 2 Top Level Page 3 Top Level Page 4 Top Level
   Page 5
 * Each of those pages can have as many as three levels of child pages below it.
   For example:
 * Top Level Page 1
    – 2nd Level Page 1 – – 3rd Level Page 1 – – – 4th Level Page
   1
 * I never want to show all the top level pages because those are already in my 
   main navigation. Instead if I’m on Top Level Page 1 I want to show only one level
   down. For example when on Top Level Page 1:
 * Top Level Page 1
    – 2nd Level Page 1 – 2nd Level Page 2 – 2nd Level Page 3
 * For every other layer deep I want to show the children and siblings of the current
   page and all the other ancestors of that page except for the very top level, 
   and I also don’t want the siblings if they are part of a different tree. In the
   example below I don’t want to show the 4th level for 3rd Level Page 2. I need
   it to look like this if on the 4th level.
 * Top Level Page 1
    – 2nd Level Page 1 – 2nd Level Page 2 – – 3rd Level Page 1 –––
   4th Level Page 1 (Current) – – – 4th Level Page 2 – – – 4th Level Page 3 – – 
   3rd Level Page 2 – – 3rd Level Page 3 – 2nd Level Page 3
 * Or if I’m on the 3rd level:
 * Top Level Page 1
    – 2nd Level Page 1 – 2nd Level Page 2 – – 3rd Level Page 1 (
   Current) – – – 4th Level Page 1 – – – 4th Level Page 2 – – – 4th Level Page 3––
   3rd Level Page 2 – – 3rd Level Page 3 – 2nd Level Page 3
 * It is pretty easy to get the child pages for every page, but getting only the
   child pages for that specific tree seems to be pretty tough with wp_list_pages.
 * Any suggestions? Please let me know if you need me to clarify anything. Thanks
   a ton.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [Jonathan Goldford](https://wordpress.org/support/users/jg-visual/)
 * (@jg-visual)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/the-ultimate-sidebar-navigation/#post-1907325)
 * Just in case anyone comes across this looking for an answer, I ended up using
   the Simple Section Navigation Widget ([http://wordpress.org/extend/plugins/simple-section-navigation/](http://wordpress.org/extend/plugins/simple-section-navigation/)).
 * It works exactly how I wanted.
 *  [furyjury](https://wordpress.org/support/users/furyjury/)
 * (@furyjury)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/the-ultimate-sidebar-navigation/#post-1907420)
 * The plugin also works **exactly** how I wanted as well.
 * Would love some raw PHP code to add instead of a plugin though.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘The Ultimate Sidebar Navigation’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [furyjury](https://wordpress.org/support/users/furyjury/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/the-ultimate-sidebar-navigation/#post-1907420)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
