This code didn’t change since Twenty Eleven’s initial release. Navigation is only printed if your query has more than one page. Could that be it?
Since you are calling $wp_query->have_posts()
rather than have_posts()
, this suggests you are modifying or overriding the query, which may be confusing WordPress (and it’s not WP’s fault). (See When should you use WP_Query vs query_posts() vs get_posts()?.)