• OOOPS! SORRY- can someone move this to a better category? My fault. I’m tired. ??

    OK, I’m so proud! I figured out how to get a sub menu to display ONLY if there are children of the page. ??

    My problem is now, that when viewing a child page, I want the menu to still appear for all children pages under that parent. That’s where I get stuck, and it’s 4:30 am, and my eyes are fried. ??

    Example is here: https://www.tuesdaytourney.com/about/

    Top of the sidebar: ‘about’ has 3 children pages. When you click on 1 of those 3 children pages though, the menu disappears (because there are no children of that child, I know). I’d like the menu to still show all 3 children pages of the overall parent page whenever viewing any of the children pages within it.

    Code I used to display the children pages IF they exist is found here: https://codex.www.ads-software.com/Template_Tags/wp_list_pages#List_Child_Pages

    Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter elmsblog

    (@elmsblog)

    HELLO??? ANYONE???

    Damn, I’ve not gotten 1 reply to my last 4 or 5 posts (over the past few months). Does no one actually come here anymore, or are my questions just too basic or too complicated. I’m just confused.

    I’ve searched the forums and the codex and I’m not able to find the answers to several questions, or the answers I HAVE found are for older versions of WP.

    Hopefully this will catch someone’s attention. Even a reply at this point of “Give me a few days to look into it” would be better than silence.

    Don’t want to sound upset, just sayin’.

    Thanks.

    You need to add that functionality to single.php as well. You could also look into this great plugin.

    HI there, I am searching for the same thing.

    I can show the child pages in a separate menu, but cant get the child menu to stay present when I click into a child page of the parent page.

    I have used the following plugin to create a folding menu in the past…. it shows the child pages even when you are on one… useful if you have all the menu together. https://www.webspaceworks.com/resources/cat/wp-plugins/30/

    But doesnt really resolve my current issue.
    Did you have any luck resolving it?

    I’m not sure if pages have the something similar, but I use this for categories.


    <?php if ($this_category->category_parent == 0) { ?>
    <?php wp_list_cats('child_of='.$cat.'&hide_empty=0&sort_column=name'); ?>
    <?php } else {?>
    <?php wp_list_cats('child_of='.$this_category->category_parent.'&hide_empty=0&sort_column=name'); ?>
    <?php } ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Parent Child Relationship- quick menu ??’ is closed to new replies.