How to prevent execution of default query, while preserving ability to use WP_Query in template?

Completely canceling main query is pretty much high level madness, that involves subclassing wp class.

I would:

  1. Hook into pre_get_posts with is_main_query() check
  2. Run featured query (still inside hook) and stash results somewhere
  3. Use those results to set excluded posts on main query

Leave a Comment