Custom menu breaks down
Custom nav menus are also a query, which you end up altering with that code. Your best bet is to check to make sure it’s the main query, e.g. by globaling $wp_the_query and doing a strict comparison with $query or doing $query->is_category() instead (I believe that works – somebody will smack me down if it … Read more