WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

Does anyone know of a way to create a sitemap by using wp_list_pages and have the order by the same orders a custom nav menu?

share|improve this question
up vote 4 down vote accepted

Using wp_list_pages you can sort order only by:

  • 'post_title'
  • 'menu_order'
  • 'post_date'
  • 'post_modified'
  • 'ID'
  • 'post_author'
  • 'post_name'

anything else (like order by custom menu order) you would have to write your own function. But a better way to get it done would be to create a custom walker for it so you could control the output.

share|improve this answer

Here's a snippet I use to create a sitemap based on custom menu order: http://snipplr.com/view/54404/wordpress-custom-sitemap-shortcode-following-custom-menu-order/

share|improve this answer

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.