WordPress.org

Ready to get started?Download WordPress

Forums

Modifying wp_list_pages output (7 posts)

  1. pelias
    Member
    Posted 9 years ago #

    I posted this in the "How-To and Troubleshooting" forum but did not have any luck with it. Hopefully This is the right place to post it.

    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/site structure. IE 5 on the Mac is choking on the CSS dropdown menus I have created becuase the top level links ("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...

    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 took a look at it and could not hack it on my own. But, ideally, I am looking for a plugin, or something, that will allow me to ensure nothing gets lost in WP upgrades. 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. Lorelle
    Member
    Posted 9 years ago #

    Simply put, no.

    Better yet, the real question is why Mac IE5 can't handle nested lists. You would have total control over the list is it could handle the nested lists. It should, so why it isn't working for yours is the question that is beyond this forum.

    Converting my static HMTL site to WP as a CMS, I fought with many of these issues and eventually had to compromise on some of the design elements. The novelty and fun of some design elements make it fun for you, but not always for the user, so sometimes giving up what you want to do actually works out for the best, I found. Simple always wins.

    Have you looked into dropdown_cats() as an alternative - it's copy and paste ready to go.

  3. YellowSwordfish
    Member
    Posted 9 years ago #

    I'll probably get flamed for saying it but does anyone actually use IE 5 on the Mac? When you have such gems as Safari, Omniweb, Firefox and even Opera to use.. I too have had most problems getting my CSS to work with this browser/edition and I have made many compromises to do so but I wonder if it is really worth it

  4. pelias
    Member
    Posted 9 years ago #

    IE 5 on the Mac has no problem when I hard code the nav adding div tags around the top level pages. The CSS works as planned in all of my browser testing. However, since I am trying to develop a generic WP install I can upload and setup I would love to be able to make the menu system as flexible as possible. If I can edit the output of the pages list we are golden.

    For this purpose WP is not going to be used as a blog so I would prefer to use the pages feature oppossed to the categories. Also the dropdown_cats() is not the functionality I am looking for. I am looking for along the lines of CSS menus. I also have the problem that user has to have the drop down menus because "they are soooooo cool!" ;-)

    If we could have the optioanl functionality of wp_get_archives() then we're set. It would be great if these funtions that listed data shared the same functionality. Is this possible? http://codex.wordpress.org/Template_Tags/wp_get_archives

  5. pelias
    Member
    Posted 9 years ago #

    YellowSwordfish -- I agree but what surprises me is how many people just use IE 5... I am working with two desigers right now (on this project) that use IE 5 and "have to have it work". Granted the browser is a pain (and not even being developed any more). Since IE 5 is part of our target audience I have to find a way to get it to work.

    Thanks for the reply though. It is much appreciated!

  6. osakaben
    Member
    Posted 9 years ago #

    Well, when you have a mac with OS9 that no one is willing to let you upgrade, then yeah, sometimes you have to have IE5.

    Basically the problem to me is that the template tags, though documented pretty well, are not documented completely. It would help to have a few more examples. Even so, I think that the current implementation of tags that deal with pages is far too limited to allow WP to be the everymans-CMS that it could very well be. I mean, currently there are these nice "Custom Fields" for pages, but with no way to query these parameters outside the Page in which they reside, I can't make much use of them.

  7. Tim Griffin
    Member
    Posted 8 years ago #

    Is there a working example of wp pages doing the drop down css? I am looking for a way to do this without js and want the drop down to be dynamic. I discovered wp_pages_nav over at http://adsworth.info/wp-pagesnav . I don't think that is what I am looking for...
    I will keep looking, but anyone has a wordpress 1.5 site already doing this - shout it out!

    tGriff

Topic Closed

This topic has been closed to new replies.

About this Topic