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