How to add categories to wp_list_pages()

What (if any) is the hook or method for including named categories into the wp_list_pages function?

The end result would be that the categories are added onto the end of the list of pages (along with any child categories that exist, with proper ul/li nesting for drop down css to act on)…

Read More

Home | About | Contact | Category 1 | Category 2

Related posts

Leave a Reply

3 comments

  1. There are plenty of hooks in there (wp_list_pages is final output) and you can even pass your own Walker Class to it in walker argument. But I think this is going to be huge mess because of nesting and such.

    Why don’t just call wp_list_categories() right after it with similar markup and style both so they look alike?

  2. Install the following plugin :

    http://www.deluxeblogtips.com/meta-box/ (custom meta box)
    This plugin will let you to create a checkbox list with customs categories values for your edit page.

    I override the plugin from Tony Archambeau and implements a basic Walker class extended from Walker_Page (wp-includes/post-template.php l.977) and integrate a condition for my customs categories displayed as a class if they exist.
    http://tonyarchambeau.com/blog/453-plugin-sitemap/ (generate a sitemap in a page thanks to a shortcode)

    Here the source

    http://pastebin.com/u7imhz0m
    

    Hoping that it will help you.