OK, I’ve tracked down the source of this. It’s somewhere in the query of get_posts() which is called by wp_get_nav_menu_items(). But messing around with that function got me another headache: Why can there be 8 posts if I allow sticky posts, when I limited the count on 5? Of course only on the category site. :S
I’m officially clueless. This works on every other page, but in the category archive I get exactly 8 other posts than the two specified:
function get_posts($args = null) {
$defaults = array(
);
$r = wp_parse_args( $args, $defaults );
if ( ! empty($r['include']) ) {
$r['posts_per_page'] = 2; // only the number of posts included
$r['post__in'] = wp_parse_id_list( '442, 427' );
}
$get_posts = new WP_Query;
return $get_posts->query($r);
}