WordPress.org

Ready to get started?Download WordPress

Forums

horizontal page menu with subpages on next line (2 posts)

  1. danaherlihey
    Member
    Posted 5 years ago #

    Hi

    I would like to know how to do this

    I want to have the pages of the blog listed in a horizontal menu

    so for example

    PAGE 1 PAGE 2 PAGE 3 PAGE 4

    however, if there are subpages, and you are on a page that has subpages I want the menue to look like this (lets pretend page 2 has three subpages)

    PAGE 1 PAGE 2 PAGE 3 PAGE 4
    page2A page2b page2c

    any help would be greatly appreciated.

  2. mores
    Member
    Posted 5 years ago #

    the top navigation will be done with wp_list_pages where you set depth = 1 so you only show the parent pages.
    Then under that you list child pages, if they exist, by using this bit:
    http://codex.wordpress.org/Template_Tags/wp_list_pages#List_subpages_even_if_on_a_subpage

    The rest is just css styling.

Topic Closed

This topic has been closed to new replies.

About this Topic