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
- Open Settings → POM Theme → Templates → HMTL templates → Archive HTML templates.
- Select Add archive template.
- Enter a descriptive Template name.
- Add the page structure in Template HTML.
- Insert
{{archive_results}}at the exact point where the result loop must appear. - Add archive or term merge tags as needed.
- Select any required Custom CSS Stylesheets and Custom JS Scripts.
- 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:
- Open Settings → POM Theme → Templates → Blog → Post archive.
- Choose the template under Sidebar layout.
- Select the required Results wrapper and Custom result template.
- Save and visit a category, tag or date archive.
For a POM custom post type:
- Open Settings → POM Theme → Templates.
- Open the tab for the relevant post type archive.
- Choose the template under Archive layout.
- Select the required Results wrapper and Custom result template.
- Save and visit the archive URL.
For WooCommerce:
- Open Settings → POM Theme → E-Commerce → Storefront → Product archives.
- Choose the template under Archive layout.
- Configure the result wrapper and custom result template.
- 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}}.