WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

According to the Codex docs, wordpress uses the query string and the template hierarchy to determine which template to use for a certain page.

First, WordPress matches every Query String to query types — i.e. it decides what type of page (a search page, a category page, the home page etc.) is being requested. Templates are then chosen — and web page content is generated — in the order suggested by the WordPress Template hierarchy...

However, using Dashboard settings, you can hand pick templates for pages:

screenshot of dashboard page attributes

So, in this case, how does the Wordpress engine determine this, and where is the information stored?

share|improve this question
up vote 1 down vote accepted

It's stored in post meta under the key _wp_page_template.

share|improve this answer
And that is so obvious I feel stupid for not finding it myself. Thanks! – george Jan 9 '12 at 20:36

Your Answer


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.