Inicio - Documentación - POM Theme - 08 Templates - Understand the template system

Understand the template system

POM Theme separates a results page into layers. Choosing the correct layer prevents duplicated markup and makes a design reusable.

The three template types

Template type What it controls Typical dynamic content
Archive The page shell around an archive Archive title, term description, term media and the complete results region
Feed One repeated item inside a results region Item title, image, excerpt, custom fields, taxonomy terms and product information
Single The body of one post or custom post type item Full content, post metadata, galleries and previous/next navigation

An archive template can place {{archive_results}} inside its HTML. The selected feed template is then repeated once for every result.

Archive shell, repeated feed item and single template assignment

Where templates are created

  1. Open Settings → POM Theme → Templates → HMTL templates.
  2. Choose Archive HTML templates., Feed HTML templates. or Single HTML templates.
  3. Add a template and complete Template name and Template HTML.
  4. Select Custom CSS Stylesheets or Custom JS Scripts only when the template needs those assets.
  5. Save the theme settings.

The navigation label is displayed as HMTL templates in the current interface.

Creation and assignment are separate

Saving a template makes it available for selection; it does not assign it automatically.

  • Archive templates are selected as Sidebar layout for WordPress post archives or as Archive layout for a supported custom post type or product archive.
  • Feed templates are selected as a Custom result template in archive, author and search settings, or directly by a Listings (Feed) element.
  • Single templates are selected as the Layout style for posts or as the Single layout of a POM custom post type.

A reliable design sequence

  1. Decide which layer owns the required markup.
  2. Create semantic static HTML.
  3. Add only merge tags supported by that template type.
  4. Protect optional fields with conditionals or fallbacks where supported.
  5. Assign the template.
  6. Open a representative public URL and verify populated, empty and long values.

Related guides