Title: Odd problem with wp_nav_menu
Last modified: August 20, 2016

---

# Odd problem with wp_nav_menu

 *  [nickjmorton](https://wordpress.org/support/users/nickjmorton/)
 * (@nickjmorton)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/odd-problem-with-wp_nav_menu/)
 * I have an odd problem with wp_nav_menu effecting the post order on subsequent
   post queries made throughout the site I’m working on. I’m using a very heavily
   modified commercial theme and wp_nav_menu is included within the first few lines
   of header.php as normal. This is the particular code (which seems normal to me):
 * `wp_nav_menu( array( 'container' => '', 'menu_class' => 'nav1', 'theme_location'
   => 'primary' ) );`
 * The problem is that ANY post query that is made after the header has been included
   returns posts ordered by menu_order no matter what orderby argument has been 
   set for both query_posts() and individual WP_Query instances.
 * I’ve narrowed it down to the nav menu because if I simply remove the wp_nav_menu
   function from header.php, all subsequent post queries order by date descending
   as expected. Any attempt to manually set orderby=date&order=DESC is completely
   ignored if I have the wp_nav_menu in the header.
 * This has got me stumped. Anybody experienced anything like this and know what
   might be causing it?

Viewing 1 replies (of 1 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/odd-problem-with-wp_nav_menu/#post-2364856)
 * As this is a commercial theme, we cannot really help. You need to seek support
   from the theme vendors. But I can say that it’s highly unlikely that the issue
   is wp_nav_menu() itself. Its far more likely to be something funky going on (
   with a secondary loop perhaps?) in header.php.

Viewing 1 replies (of 1 total)

The topic ‘Odd problem with wp_nav_menu’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/odd-problem-with-wp_nav_menu/#post-2364856)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
