WordPress.org

Ready to get started?Download WordPress

Forums

Modifying wp_list_pages output (4 posts)

  1. pelias
    Member
    Posted 9 years ago #

    Is it possible to pass custom formatting into the wp_list_pages function?

    Specifically I am using WP as a light CMS and taking advantage of the "Pages" feature to control navigation. IE 5 on the Mac is choking on the CSS dropdown menus I have created becuase the top level "pages" need to be enclosed in div's. Since I am not a CSS expert I have no clue why FF/Safari/IE 6 render everything fine. IE 5 for the Mac is killing me...

    Anyway is it possible to output wp_list_pages as such (top level items enclosed in divs):
    <ul>
    <li><div>Page</div>
    <ul><li>SubPage</li>
    <li>SubPage</li>
    <li>SubPage</li></ul>
    </li>
    <li><div>Page</div></li>
    <li><div>Page</div>
    <ul><li>SubPage</li>
    <li>SubPage</li>
    <li>SubPage</li></ul>
    </li>
    <li><div>Page</div></li>
    </ul>

    I am hoping this can be done without modifying the WP source code. I can do it but I would love to be able to make this as maintainable as possible. When WP is upgraded I would hate to have to keep remembering to edit the source if I forget to make a back up or something.

    Thanks for any help with this!

  2. osakaben
    Member
    Posted 9 years ago #

    Yeah, I could use some help with this too.

  3. pelias
    Member
    Posted 9 years ago #

    I posted this at http://wordpress.org/support/topic/34008#post-192455

    Maybe we can find some help over there.

  4. moshu
    Member
    Posted 9 years ago #

    No need for double posting! Please.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.