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?

1 Answer 1


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

  • And that is so obvious I feel stupid for not finding it myself. Thanks!
    – george
    Jan 9, 2012 at 20:36

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.