title: Display current parent and its sub-menu only - wordpress
body: <p>I have a main navigation and all parents have children.
  Eg:</p>
  
  <pre><code>Page A: About Us
  child1
  child2
  
  Page B : Our services
  Child 3
  Child 4
  </code></pre>
  
  <p>I need to include a horizontal sub-menu on a page. But my problem is, if currently we are on page A, all the child items of page A only to be displayed on page.
  If we are on Page A, it should looks like:</p>
  
  <pre>Page A
  Child 1
  Child 2</pre>
  
  <p>Like this, when we go to Page B, the child of page B only to be displayed. </p>
  
  <pre><code>      &lt;?php 
    $args = array(
     'theme_location'  =&gt; '',
     'menu'            =&gt; '13',  //nav menu id, which has about-us as a menu.
     'container'       =&gt; 'div',
     'container_class' =&gt; '',
     'container_id'    =&gt; '',
     'menu_class'      =&gt; 'menu',
     'menu_id'         =&gt; '',
     'echo'            =&gt; true,
     'fallback_cb'     =&gt; 'wp_page_menu',
     'before'          =&gt; '',
     'after'           =&gt; '',
     'link_before'     =&gt; '',
     'link_after'      =&gt; '',
     'items_wrap'      =&gt; '&lt;ul id="%1$s" class="%2$s"&gt;%3$s&lt;/ul&gt;',
     'depth'           =&gt; 0,
     'walker'          =&gt; ''
  );
    $menu_items = wp_nav_menu($args);//wp_get_nav_menu_items(13);
  </code></pre>
  
  <p>I tried writing above code, which resulted in all the parent items with their children.</p>
  
  <p>Can someone help me on this?</p>
  
  <p><strong>In short,</strong> I want to get all the children(sub-menu) of <em>About us</em> menu entry.(i.e. I want child1 &amp; child2 as a list with <code>&lt;a&gt;</code> tags)</p>