Get a free trial // Grow your CSS skills // Land your dream job

Unordered Lists question!

  • # February 14, 2013 at 5:38 pm

    I am trying to create a footer in WordPress that lists the pages and subpages to format JUST like it’s typed below… with the main page followed by subpages on the same line, then the new main page is on the next line with it’s subpages, etc.

    • Home
    • About Us

      • Our People
      • Our Philosophy

    • Services

      • Creative
      • Instinctive

    • Contact Us

      • Sign Up for Newsletter
      • Employment Opportunities

    The actual html is:

      < ?php wp_list_pages( 'title_li=' ); ?>

    This shouldn’t be so hard — What am I missing? Here is the url:

    Thanks in advance!

    # February 14, 2013 at 5:50 pm

    it’s better to do just the home about our process … and prevent the submenus because it’s a bad practice

    # February 14, 2013 at 6:01 pm

    As all the subpages are contained in ul.children, couldn’t you just set them as inline eg:

    .footer ul .children {
    display: inline

    If I’m misunderstanding your issue, get back to me and I’ll be glad to help.

    # February 14, 2013 at 6:02 pm

    wp_list_pages is a fairly outdated. I would also recommend against displaying the sub-pages for the same reason Musama mentioned.

    Register a new nav menu instead. That way you can manage the links and all that fun stuff via the WP Dashboard.

    [WP Nav Menu Codex]( “WP Nav Menu Codex”)

    [WP Register Nav Codex]( “WP Register Nav Codex”)

    [Overview and Tutorial]( “Overview and Tutorial”)

    # February 14, 2013 at 7:17 pm

    Thanks to everyone… this is the first WordPress site I’ve done, besides simple blogs…

    For this instance, we want the subpages included in the footer.

    I’ll probably just have to manually create something when all the pages have been determined.

    # February 14, 2013 at 7:28 pm

    Whoa whoa whoa. Why are we suggesting that a submenu is bad practice?

    # February 14, 2013 at 8:12 pm

    Using nav is allot easier and more convenient than using lists as navigation.

    # February 15, 2013 at 3:53 am

    I would also like to know why submenus are bad practice.

    @janet4now Maybe might help you. Rather than spitting out a preformatted list, it will give you an array to do with as you please.

    # February 15, 2013 at 7:21 am

    Like this? –

    # February 15, 2013 at 10:20 am

    To clarify, I was against the idea of having the sub menu items all inline. Especially if if another parent item is displayed on that line.

    I believe looking at janet’s post now, the board was just barfing up the list in her code rather than formatting it as a code block.

    # February 15, 2013 at 10:43 am

    >the board was just barfing up the list in her code rather than formatting it as a code block.

    You mean it’s just chucking out a list of ‘li’ without any indication as to whether they are submenu list items or not?

    It doesn’t seem to be doing that now…

    # February 15, 2013 at 12:43 pm

    That’s because I fixed it ;)

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed