WordPress.org

Ready to get started?Download WordPress

Forums

How To Show ONLY Parent Pages (4 posts)

  1. KellyStone
    Member
    Posted 6 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
    Member
    Posted 6 years ago #

    Where did you search and search?

    http://www.google.com/search?q=wordpress+list+pages

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

    Set the depth to 1.

  3. raiaftab
    Member
    Posted 6 years ago #

    Here you go...

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

    Aftab

  4. jennsweb
    Member
    Posted 5 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