WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Display pages, but not subpages (3 posts)

  1. kservik
    Member
    Posted 7 years ago #

    I want to display the pages, but not the sub-pages on the sidebar.

    What is the command to do this?

    Thanks for any help I can get :-)

  2. moshu
    Member
    Posted 7 years ago #

  3. kservik
    Member
    Posted 7 years ago #

    Yes, that is just fantastic!

    This is the correct code:

    <?php wp_list_pages('depth=1'); ?>

    This is the code combined with title:

    <?php wp_list_pages('depth=1&title_li=<h2>Meny</h2>'); ?>

    Thanks moshu :-)

Topic Closed

This topic has been closed to new replies.

About this Topic