serpico
Member
Posted 2 years ago #
I would like to create a dynamic navigation menu which incorporates list results from both wp_list_pages and wp_list_categories. So that pages and categories can appear in the same menu. I do not want to have to create a list for both separately. Is this possible? Does a function exist?
serpico
Member
Posted 2 years ago #
Cheers MichaelH - that will solve for now. Didn't think an actual function existed which would display both pages and category results anyway... unless I coded it myself. Perhaps a plugin for the future.
because both echo list items <li>, you shold be able to stick them into the same unordered list:
for example:
<ul role="navigation">
<?php wp_list_pages('title_li=' ); ?>
<?php wp_list_categories('show_count=1&title_li='); ?>
</ul>
obviously, that won't mix the items, or sort them, so there will be the pages first in the menu, followed by categories.
untested ;-)