Inicio - Documentación - POM Theme - 08 Templates - Build an archive template

Build an archive template

Use an archive template when you need to replace the outer presentation of a supported archive while retaining its result loop.

Before you begin

Prepare:

  • A WordPress post, custom post type or WooCommerce product archive where the template can be assigned.
  • A feed template for each repeated result, if the default result card is not suitable.
  • A representative taxonomy term if the design uses term description, image, background or color.

Create the template

  1. Open Settings → POM Theme → Templates → HMTL templates → Archive HTML templates.
  2. Select Add archive template.
  3. Enter a descriptive Template name.
  4. Add the page structure in Template HTML.
  5. Insert {{archive_results}} at the exact point where the result loop must appear.
  6. Add archive or term merge tags as needed.
  7. Select any required Custom CSS Stylesheets and Custom JS Scripts.
  8. Save the theme settings.

This minimal structure keeps the page shell separate from each result card:

<header class="catalog-header">
    <h1>{{archive_title}}</h1>
    <div class="catalog-description">{{term_description}}</div>
</header>

<main class="catalog-results">
    {{archive_results}}
</main>

Assign the template

For the WordPress blog:

  1. Open Settings → POM Theme → Templates → Blog → Post archive.
  2. Choose the template under Sidebar layout.
  3. Select the required Results wrapper and Custom result template.
  4. Save and visit a category, tag or date archive.

For a POM custom post type:

  1. Open Settings → POM Theme → Templates.
  2. Open the tab for the relevant post type archive.
  3. Choose the template under Archive layout.
  4. Select the required Results wrapper and Custom result template.
  5. Save and visit the archive URL.

For WooCommerce:

  1. Open Settings → POM Theme → E-Commerce → Storefront → Product archives.
  2. Choose the template under Archive layout.
  3. Configure the result wrapper and custom result template.
  4. Save and visit the shop or a product taxonomy archive.

Expected result

The archive uses your outer HTML, and {{archive_results}} displays the matching entries. Each entry uses the configured feed template.

Verify the result

  • Confirm the title and term fields match the current archive.
  • Confirm results appear exactly once.
  • Test a top-level and child term if {{parent_term_id}} is used.
  • Test an archive with no matching results.
  • Check that selected CSS and JavaScript assets affect only the intended design.

If the header appears but no entries do, first confirm that the template contains {{archive_results}}.

Related guides