• Resolved Matthew

    (@serpico)


    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?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Will offer another alternative in case you don’t get an answer:
    How to easily display links to both Pages and Categories in the blog navigation header?

    Thread Starter Matthew

    (@serpico)

    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 ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Combining wp_list_pages and wp_list_categories results’ is closed to new replies.