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)...

Home | About | Contact | Category 1 | Category 2

3 Answers 3


Wouldn't it be even easier to call wp_nav_menu() and customize your menu as you please from the admin menu?

  • This is realy better, with this solution you become a usefull markup and classes for set in stylesheet.
    – bueltge
    Commented Dec 21, 2010 at 19:23
  • Probably so. I'll check out wp_nav_menu()
    – Scott B
    Commented Dec 22, 2010 at 18:35

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?


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


Hoping that it will help you.

  • class WP_LIST_WALKER is not a proper name for a custom class. Prepare for name collisions.
    – fuxia
    Commented Jan 2, 2013 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.