The MU forums have moved to WordPress.org

Display subpages (2 posts)

  1. kishorebudha
    Member
    Posted 15 years ago #

    In the sidebar, child (or sub) pages are not being displayed. Any clues? The code is as follows

    <h2 class="hide">Main menu:</h2>
    <ul class="page">
    <?php if (is_page()) { $highlight = "page_item"; } else {$highlight = "page_item current_page_item"; } ?>
    <li class="<?php echo $highlight; ?>"><a href="<?php bloginfo('url'); ?>">Home</a></li>
    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
    </ul>
  2. lunabyte
    Member
    Posted 15 years ago #

    Check the function "wp_list_pages" on the codex. I can't remember if it's categories, pages, or both that have a show_children flag.

    Either way, compare your input to the function against available parameters.

About this Topic

  • Started 15 years ago by kishorebudha
  • Latest reply from lunabyte