Get query result before posts are displayed?

You can use the the_posts filter to loop through the results before they get returned.

Proof of concept:

function test_the_posts($a) {
  var_dump($a); die;
}
add_action('the_posts','test_the_posts');

I am fairly certain (though I haven’t tested it) that you could pretty easily break pagination and probably other things by fiddling with that, so be careful.

tech