• Hello,

    In my wordpress driven site I have 2 level navigation menu. Top level page, it lists the children of that pages (links only) bottom. So for some pages the sublinks come come up and for some it wont, aI think its because of the same page name.

    For example take this page structure.

    Link 1
    -About /link1/about
    -Contact Us /link1/contact-us

    Link2
    -About /link2/about
    -Services /link2/services

    So what is happening is. the sub page “About” is disappeared from the navigation.

    Here’s how the sub nav works, it lists the child pages of the selected page :-
    http://tinyurl.com/2f3dea4

    These 2 parent pages have the same children pages (Title wise), so nothing is coming up.
    http://tinyurl.com/23coew6
    http://tinyurl.com/2dwurh4

    This is just one place this occur there are some pages that list only few subpages because the pages that should show up has been hidden because of this duplicate thing.

    This is the code I use to list the sub pages,

    $subQuery = new WP_Query();
    								$all_wp_pages = $subQuery->query(array('post_type' => 'page'));
    
    								$mainPage =  get_the_ID();//get_the_ID();
    									// Filter through all pages and find children
    									$mainPage_children = get_page_children($mainPage, $all_wp_pages);

The topic ‘Child Pages Wont Come Up’ is closed to new replies.