How to achieve the perfect side navigation for Child_Of ? (many tries) (3 posts)

  1. mpesgt01
    Posted 2 years ago #

    I have read and tryed this :

    What I want but can get it the right way is having a sidebar sub-navigation showing the child pages, preferably inside a page/section So like a second navigation in sidebar just for this section.

    works! (nothing is showing)

    mysite.com / page A
    works! (but would be better without the subsub showing)

    mysite.com / page A / sub-page A
    works! (perfect!! just like a cute second nav of this section, yay! )

    mysite.com / page A / sub-page A / subsub A
    Doesn't work! (nothing is showing... so how to go back ? Maybe because there is no more children page regarding the WP nav... I would like it to show exactly like on "sub-page A" please.)

    Oh, and here is the code I am using

      $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
      if ($children) { ?>
      <aside class="widget childof">
      <h3>Related pages</h3>
      <?php echo $children; ?>
      <?php } ?>
  2. mpesgt01
    Posted 2 years ago #

    cam it be some solution like this ?

    if : child child = show childs
    if : child child child = show parent

  3. mpesgt01
    Posted 2 years ago #

    By the time someone may answer if that if possible or not, I was thinking using Yoast Breadcrumbs with a twist...

Topic Closed

This topic has been closed to new replies.

About this Topic