Title: Modifying wp_nav_menu?
Last modified: August 19, 2016

---

# Modifying wp_nav_menu?

 *  Resolved [DeNiro](https://wordpress.org/support/users/deniro/)
 * (@deniro)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/modifying-wp_nav_menu/)
 * Hi there!
 * I’m working on a small WordPress plugin and I got stuck.
 * I have 10 pages and `<?php wp_nav_menu(); ?>` shows all the names and links to
   them.
 * I want to cut these to the first 4 pages and sort them by sort order (sort_order).
 * Or maybe there’s a way with `<?php get_pages() ?>`?
 * Thanks!

Viewing 1 replies (of 1 total)

 *  Thread Starter [DeNiro](https://wordpress.org/support/users/deniro/)
 * (@deniro)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/modifying-wp_nav_menu/#post-1728226)
 * RESOLVED:
 * `<?php wp_list_pages('sort_column=menu_order&title_li=&number=4&'); ?>`
 * Don’t get why wp_nav_menu is less flexible than wp_list_pages (won’t use _wp_nav_menu
   at all, because seems pointless to me).
 * Cheers.

Viewing 1 replies (of 1 total)

The topic ‘Modifying wp_nav_menu?’ is closed to new replies.

## Tags

 * [wp_nav_menu()](https://wordpress.org/support/topic-tag/wp_nav_menu/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 1 participant
 * Last reply from: [DeNiro](https://wordpress.org/support/users/deniro/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/modifying-wp_nav_menu/#post-1728226)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
