Skip to content
daggerhart edited this page Mar 16, 2012 · 3 revisions

Template files control the majority of any query's html output. A single QW query will have at least 2 levels of file templates; the wrapper and the row.

Template hierarchy:

  • Query specific template in theme directory
  • Generic template in theme directory
  • Generic template in query-wrangler/templates plugin directory

All templates can be overridden on a query-by-query basis by making use of the expected naming conventions.

query-wrapper-[slug].php

Controls the general structure of the query's output, such as header, footer, exposed filters, etc.

query-[template_style]-[slug].php

Controls the style wrapper of the query rows.

Examples:

  • query-unformatted.php - All queries with Row Style: Fields & Template Style: unformatted.
  • query-table.php - All queries with Row Style: Fields & Template Style: table.
  • query-ordered_list-portfolio.php - Queries with Row Style: Fields, Template Style: ordered list, and the slug portfolio.
  • query-excerpt.php - All queries with Row Style: Posts & Posts Settings: Excerpt.

query-[row_style].php

Controls the style of an individual row.

Clone this wiki locally