I noticed that when I changed the WP_Query to ask for a certain category, the page served was category.php. So I'm guessing there's a block of code somewhere that decides which template to serve based on keys in the query. Where is it?

  • @t31os please move that to an answer.
    – Rarst
    Oct 14 '11 at 21:20

The template loader determines which template to load for a given view, there's a filter available to change this though, template_include as seen on the source page linked.

Moved from comment to answer.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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