Modifying wp_list_pages output
-
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!
- The topic ‘Modifying wp_list_pages output’ is closed to new replies.