Page Templates


If you have a specific WordPress page or pages that require a different layout than any of the page templates that your theme provides, you can create your own custom page template. Twenty Twelve provides these three templates:

  • Default Template
  • Front Page Template
  • Full-Width Page Template No Sidebar

On the server you should find the following directory if you are using Twenty Twelve:

wp-content/themes/twentytwelve/page-templates/

Inspecting this template reveals a get_header() and a get_footer() function with a loop between them. The loop is surrounded by two div elements that are used for styling. Here you can do what you want. You do not have to use the loop. For example, just use a function to determine if the user is using a mobile device or not. wp_is_mobile()