• Resolved scottcarlton

    (@scottcarlton)


    I’am using Custom Post Type Archive and it causes my wp_nav to disappear. I found this WP Nav Menu Dissapears in Category Pages but didn’t seem to work. And I used is to add custom post to query

    add_filter('pre_get_posts', 'query_post_type');
    function query_post_type($query) {
      if(is_category() || is_tag()) {
        $post_type = get_query_var('post_type');
    	if($post_type)
    	    $post_type = $post_type;
    	else
    	    $post_type = array('post','press','nav_menu_item');
        $query->set('post_type',$post_type);
    	return $query;
        }

    I am pretty frustrated here. Please help! Thanks

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom Post Type Archives (menu disppear)’ is closed to new replies.