Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question
    
@t31os please move that to an answer. –  Rarst Oct 14 '11 at 21:20

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
Thanks, exactly what I was looking for! –  Isaac Lubow Jan 22 '12 at 10:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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