The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

How To Show ONLY Parent Pages (4 posts)

  1. KellyStone
    Posted 8 years ago #

    I really want to show only parent pages on one of my blogs. I have searched and searched but can't find a way of doing this - even with plugins.

    I'm sure that someone will know some code that could be placed in to do this.

    Hope someone can help. Thanks.

  2. Kalessin
    Posted 8 years ago #

    Where did you search and search?


    The first result is http://codex.wordpress.org/Template_Tags/wp_list_pages

    Set the depth to 1.

  3. raiaftab
    Posted 8 years ago #

    Here you go...

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


  4. jennsweb
    Posted 7 years ago #

    Actually tried that and the theme display got messed up a bit, so I tried this:

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

    Seemed to work after that!

Topic Closed

This topic has been closed to new replies.

About this Topic