I don't use The Loop, because I use different queries to fetch posts (I use 3 queries instead of one).

How to disable main query for home, category and search pages?

1 Answer 1


This is not trivial, because "home,category and search" are logically determined while main query churns through stuff. I am pretty sure I read this is possible, but that was in context of syndicating site that hadn't used posts/loop at all and scrapped it to do different stuff.

More typical approaches are:

  1. Integrate custom logic into main query, by using pre_get_posts, posts_* and other relevant filters.

  2. Leave main query for one of loops and implement other loops as secondary.

  • I will try that and report results.
    – Stancell
    Commented Oct 2, 2012 at 8:32
  • 2
    posts_request filter allows to replace main query.
    – Stancell
    Commented Oct 2, 2012 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.