WordPress.org

Ready to get started?Download WordPress

Forums

What Governs The Format of How Pages are Listed? (7 posts)

  1. Axo1ot1
    Member
    Posted 8 years ago #

    I'm working on a custom theme, and I want my pages to display in the header in a horizontal orientation (like this: <b>home • page1 • page2 • page 3</b>), which I can accomplish with html and knowing the URLs to my pages ahead of time, but I'd rather use code to generate that so that if anyone else uses the themes they don't have to dig through the header file to change how that works. Unfortunately all I've been able to do is get it to display as a vertical list.
    (Like this:

    • Home
    • Page 1
    • Page 2
    • Page 3
    )

    It really doesn't look as good. Does anyone know what governs how pages are listed and how I can get this working?

  2. Mark (podz)
    Support Maven
    Posted 8 years ago #

    http://css.maxdesign.com.au/listamatic/

    You could dissect parts of other themes to see how they do it, but essentially it's just a horizontal list (see above link) with some self-referring href code
    <a href="#">page 1</a>
    which the user then completes as they want.

  3. Axo1ot1
    Member
    Posted 8 years ago #

    Yeah but where in a theme is it determined how a list will display?

  4. Mark (podz)
    Support Maven
    Posted 8 years ago #

    The css.
    Head to the link above and it supplies it all.

  5. moshu
    Member
    Posted 8 years ago #

    Most likely in the CSS file.
    (Actually in my Dark Maple theme I also included a horizontal menu, and I've used a separate file for it which is called by a php include...)

  6. Kafkaesqui

    Posted 8 years ago #

    Simple example: For my Boxy But Gold theme I placed wp_list_pages() in a div with an id of 'pages-menu', and then in my css:

    #pages-menu ul {
    display: inline;
    list-style-type: none;
    }

    #pages-menu ul li {
    display: inline;
    }

    To retain the list bullets just remove list-style-type: none;

  7. Axo1ot1
    Member
    Posted 8 years ago #

    Thanks for all the suggestions. I'm still not able to get it working... :(

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags