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

I have a site whose navigation disappears on category pages for posts in the ‘post’ post type, but not for posts in any of my custom post types. The ‘post’ post type and post of the custom post types use the same template file for theirs archives and headers – no differences. The menu is using the wp_nav_menu function. Example links below (again, same template files being used):

Menu: http://politichicks.tv/column/

No Menu: http://politichicks.tv/category/videos

share|improve this question
You must have figured this out. What worked? I have the same issue, only on the category page do my menus not show. – mikato Jun 18 '15 at 21:31
this often happens when a theme or plugin has an incorrectly targeted pre_get_posts action. the query modifications intended for the main query are also applied to the query for menu items, causing no items to be returned. – Milo Feb 28 at 5:36

Have you tried using the wp_nav_menu() function? here is the wp_nav_menu reference.

Instead of this:

<?php if ( has_nav_menu( 'primary' )) {
                    /*$backup = $wp_query;
                    $wp_query = NULL;
                    $wp_query = new WP_Query(array('post_type' => 'post'));*/
                    /*$wp_query = $backup;*/

I wold try this:

<?php if ( has_nav_menu( 'primary' )) {     
    wp_nav_menu( array('menu' => 'primary' ))
share|improve this answer
That's essentially what's happening right now, but yes, I've tried explicitly calling wp_nav_menu( array('menu' => 'primary' ) ). In fact, the code as seen in header.php is a response to the wp_nav_menu() not working. – Alan Breck Nov 27 '13 at 21:57

Have you checked your archive.php or category.php file? If you use the same header.php the code should be displayed.

share|improve this answer
Both the post and custom post types are using the same template file which uses the same header file. – Alan Breck Nov 27 '13 at 21:55
This is really more of a comment than an answer isn't it? – s_ha_dum Dec 8 '13 at 4:24

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.