Support » Fixing WordPress » How to show only top level pages?

  • Hi,

    I have found the code which should sovle my problem of only showing top-level pages in on the front page, but not sure how to enter it into the Sidebar code template. I found the line in which it should go, but by pasting it in there I made the sidebar dissapear!

    The code is: ‘sort_column=menu_order&depth=1’

    and it should go in the line: <?php wp_list_pages(‘title_li=<h1>Pages</h1>’); ?>

    I am using the Aurora theme…


Viewing 4 replies - 1 through 4 (of 4 total)
  • Try this maybe

    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li=<h1>Pages</h1>'); ?>

    Hi Jessn,

    Thanks for the reply. The sidebar is now back, but the sub-pages are still visible…


    Take a look at this example from the codex. It writes the title_li a little differently than yours and might be the issue:

    <?php wp_list_pages('sort_column=menu_order&title_li=<h2>' . __('Prose') . '</h2>' ); ?>

    So maybe try:

    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li=<h1>' . __('Pages') . '</h1>'); ?>

    Still not working.. god I have code sometimes!

    Thanks anyway.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to show only top level pages?’ is closed to new replies.