WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 4 down vote accepted

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

share|improve this answer
This is realy better, with this solution you become a usefull markup and classes for set in stylesheet. – bueltge Dec 21 '10 at 19:23
Probably so. I'll check out wp_nav_menu() – Scott B Dec 22 '10 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?

share|improve this answer

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.

share|improve this answer
class WP_LIST_WALKER is not a proper name for a custom class. Prepare for name collisions. – toscho Jan 2 '13 at 16:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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