title: How do I create a page list in wordpress that includes parents, children, and siblings, but only in certain cases?
body: <p>I'm trying to create a sidebar navigation menu that changes based on the current location in the site.</p>
  
  <p>Here's what the navigation looks like as a whole:</p>
  
  <ul>
  <li>Home</li>
  <li>About us
  <ul>
  <li>Level 1a</li>
  <li>Level 1b</li>
  <li>Level 1c</li>
  </ul></li>
  <li>Programs
  <ul>
  <li>Level 1d
  <ul>
  <li>Level 2a</li>
  <li>Level 2b</li>
  </ul></li>
  <li>Level 1e
  <ul>
  <li>Level 2c</li>
  <li>Level 2d</li>
  </ul></li>
  <li>Level 1f</li>
  </ul></li>
  <li>Contact Us</li>
  </ul>
  
  <p>Currently I'm using custom nav menus to create menus for the Home page so they can edit the custom menu via the menus link in the admin panel. They don't want a sidebar nav menu on the contact page.</p>
  
  <p>When on the about us page, they want the sidebar nav to look like this:</p>
  
  <ul>
  <li>Level 1a</li>
  <li>Level 1b</li>
  <li>Level 1c</li>
  </ul>
  
  <p>When on the Programs page, they want it to look like this:</p>
  
  <ul>
  <li>Level 1d</li>
  <li>Level 1e</li>
  <li>Level 1f</li>
  </ul>
  
  <p>When on Level 1d page, they want it to look like this:</p>
  
  <ul>
  <li><strong>Level 1d</strong>
  <ul>
  <li>Level 2a</li>
  <li>Level 2b</li>
  </ul></li>
  <li>Level 1e</li>
  <li>Level 1f</li>
  </ul>
  
  <p>making sure the the child pages only show for the current parent.</p>
  
  <p>When on the Level 2a page, they want it to look the same as if on Level 1d page:</p>
  
  <ul>
  <li>Level 1d
  <ul>
  <li><strong>Level 2a</strong></li>
  <li>Level 2b</li>
  </ul></li>
  <li>Level 1e</li>
  <li>Level 1f</li>
  </ul>
  
  <p>Also important to note is that I need to be able to style the current-page list-item differently than the rest of the items, so there'll need to be some sort of current-page-item class added to that list item each time.</p>
  
  <p>so far I have not been able to print only the children of the current parent when on Level 1d. wp_list_pages allows you to set the depth, but not limit it to only the current parent. It prints the children for all siblings as well (i.e. if on level 1d it prints all the level 2 children under their respective parents instead of only the level 2 children under the currently active parent). </p>
  
  <p>How would I do this?</p>
  
  <pre><code>    &lt;?php $current_section = "";
          if(is_front_page()):
               $current_section = "home";
               $nav_args = array(
                   'theme_location' =&gt; $current_section,
                    'container' =&gt; 'nav',
                    'container_class' =&gt; 'side-nav'
               );
               wp_nav_menu( $nav_args );
          else:
  
          endif;?&gt;
  </code></pre>
  
  <p>This is what I have at this point. I've removed all the code in the else block because it wasn't working anyway.</p>