Skip to content

Content and data

WordPress theme builder with templates, display conditions and priorities

Design one template for all blog posts, archives, products or search results, and let conditions decide where it applies. Headers and footers follow the same rules, also on pages WordPress renders with the DJIA Theme.

Route router: which template renders each addressSchematic
Example content

  1. a post in the News category
    Single · include: News · priority 20 beats 10Single · include: entire site · priority 20 beats 10
    Single · NewsPriority 20Applies
    Single · Entire sitePriority 10Matches, lower priority
    Single · Entire sitePriority 20Applies
    Single · NewsPriority 10Matches, lower priority
  2. a post in another category
    Single · include: entire site · priority 10Single · include: entire site · priority 20
    Single · Entire sitePriority 10Priority 20Applies
  3. a product page
    Product · include: entire site
    ProductApplies
  4. a search
    Search results · include: search results
    Search resultsApplies
  5. an account endpoint
    Account · include: endpoint Orders
    Account · OrdersApplies
Scroll to run the five addresses through the rules, or use the play button next to an address to trace it again. Choose an address to light its rule check and the template that wins; the two priority buttons swap the priorities of the News and Entire site templates, so the other one wins.
Each address goes through the same check: a template applies when one include rule matches and no exclude rule does, and when several match, the higher priority wins. /blog/launch-day/ is a post in News, so Single · News (priority 20) beats Single · Entire site (priority 10), while /blog/hello-world/ keeps the priority 10 template. The product, the search and the account address each match their own template. Each address is a button that lights its row, and two priority buttons swap the priorities of Single · News and Single · Entire site to show that the higher priority wins.

Templates for each kind of page

Create a template once, and every page it matches uses it.

  • Single: posts, pages and custom post types.

  • Archive: categories, tags, custom taxonomies, post type archives, the blog page, and author and date archives.

  • Search results: addresses such as /?s=… and /search/…/.

  • 404 page: used when the runtime answers a missing page, which it does in strict mode. In the default transitional mode, WordPress answers it.

  • Product and product archive: product pages, the shop, and product categories, tags, brands and attributes. Without them, products use your single and archive templates.

  • Cart, checkout, order received and account: the runtime renders these only when you publish a template for them; otherwise WordPress renders them with the DJIA Theme. They are never cached.

Account templates can target endpoints such as orders, downloads, addresses and account details, or the login and registration forms for visitors who aren't logged in.

Product cards and reusable sections are components: design a card once and pick it as the card of any product loop.

Query Loop and product cardsWooCommerce templates in detail

Headers, footers and popups

Headers and footers are layouts with the same conditions. Each page gets the first matching header and footer by priority, so a shop or a landing page can have its own.

Popups are layouts too. Every popup whose conditions match is added to the page, up to five, as a closed dialog after the footer. A popup opens when the page loads, after a delay, at a scroll depth, when the pointer leaves the page on desktop, or on a click, and you set how often: every time, once per visit or once every set number of days.

Popups, forms and off-canvas panels

Conditions and priorities

Each template has include and exclude rules, built from the same list:

  • Entire site
  • Front page
  • Post type
  • Specific IDs
  • Term
  • All archives
  • Post type archive
  • Author archive
  • Date archive
  • Search results
  • 404 page
  • Product category, with subcategories
  • Product type
  • Account endpoint
  • Language

A template applies when one include rule matches and no exclude rule does. When several templates match, the higher priority wins, on a scale from 0 to 100. At equal priority, a template for a specific language wins over one for every language. A template without conditions applies nowhere.

Example: one category with its own post design

Your Single post template covers the entire site at priority 10. A second Single template includes the News category at priority 20. Posts in News get the second design; every other post keeps the first.

A page you design directly in DJIA Builder keeps its own design. Templates cover everything else.

Language rules need a multilingual plugin. Its test status is on the integration status page.

DJIA Builder 1.0.18.5 – DocumentPlaceholder
Screenshot F02-1 · Document panel for "Single · News": Include (Term: News), one Exclude, Priority 20; beside it the template list with its Conditions column

Check a template before visitors see it

On the canvas, a template shows a sample post, product or category that you choose, with real content.

Publish a template as staged: administrators and preview links see it, while visitors keep what they see today until you choose Live for everyone. Every publish is a release, so a template can also be rolled back.

Staging, preview links and rollback

DJIA Builder 1.0.18.5 – Go live
DJIA Builder Go live, Templates tab

Routes without a Builder template

In the default transitional mode, routes without a published Builder template go to WordPress. With the DJIA Theme active, those pages get the header and footer that match them by the same conditions, plus your global styles.

In strict mode the runtime answers those routes too, with a 404 page, so switch to it once templates cover the whole site. Paths you list in the settings stay with WordPress in either mode.

Before you buy

Requirements and limits for templates
  • Product, cart, checkout and account templates need WooCommerce. Store scenarios and their test status are on the integration status page.
  • Pretty permalinks are required. With plain permalinks, WordPress answers every page.

Full system requirements

Start with one template

Rebuild one template, stage it and compare it with the page you have now. Switch it live when it's ready; everything else keeps running as it does today.