Child pages not appearing properly in main navigation (7 posts)

  1. sjfbarnett
    Posted 4 years ago #

    For some reason, the child pages attached to my 4 main navigation items are not appearing under their proper parents. Only 3 are showing, and it's the same 3 children under each parent.

    The sidebar hierarchy of these pages show up just fine — all are properly labeled in the backend — but it's the main navigation where they break.

    I can see in the backend that all parents are labeled as such, and all children are labeled correctly, so I can't see any problem at all until I look at the site itself.

    Any suggestions would be greatly appreciated.


  2. what is the code used for the second level page navigation?

    you might find it in header.php, depending on your theme.

  3. sjfbarnett
    Posted 4 years ago #

    Thanks for the reply.

    I wish I knew more about the coding aspect of this. It was my developer that built the site.

    I found this in my header.php, does it make sense?

    <li class="blog<?php echo $blog_link_class; ?>">What’s New
    <?php wp_list_pages("title_li=&sort_column=menu_order&sort_order=ASC&depth=1&exclude=292"); ?>
    <li class="model_login">Model Login

  4. the code you posted is the one for the top page navigation (the 'fancy' tabs)

    the code for the sub-navigation might be in page.php of your theme:

    something after: <div id="sub_navigation">

    also probably containing some code with wp_list_pages()

  5. sjfbarnett
    Posted 4 years ago #

    ok, this is what I've found, but doesn't this make sense that it *would* look like this?

    } else {
    $sub_pages = wp_list_pages("child_of=$post->ID&title_li=&echo=0&sort_column=menu_order&depth=1");

    if ($sub_pages) {
    <div id="sub_navigation">

      <?php echo $sub_pages; ?>

    <br class="clear" />
    <?php } ?>

  6. this is close; it would help to see more code before these lines.

    can you paste the whole code of this file into a http://wordpress.pastebin.com/ and post the link to it here?

    someone might have a look at it and might be able to make some suggestions.

  7. sjfbarnett
    Posted 4 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic