pom_get_template_schema: inspect a template schema
What shape a template type takes: its required fields, its layout options, how it gets assigned, and which settings keys carry that assignment.
Arguments
| Argument | Required | Meaning |
|---|---|---|
type |
Yes | archive, single or feed |
An unrecognised type falls back to single. Check the type in the response.
Permissions
mcp:read and pom_theme:read, with edit_theme_options.
Common to all three
Every type requires template_name and template_html, reports how many merge tags its context has, and names pom_validate_template_markup as its validation tool. Each also points at a resource URI holding longer guidance.
Archive templates
For listing pages.
- Layout IDs:
left,right,full-width,contained-width,both. - Required content:
archive_results— the loop has to be somewhere. - Assignment: through
pom_post_archive_sidebar_layoutfor the native post archive, orpom_{post_type}_archive_sidebar_layoutfor a custom post type.
The required content is the thing to notice. An archive template without {{archive_results}} renders a page with no results, which looks like a data problem and is a template problem. The validator warns about it.
Single templates
For individual items.
- Layout IDs:
simple,vc. - Assignment:
pom_post_single_layoutfor native posts, or the content model'ssingle_layoutfor a custom post type.
The vc layout means the template participates in builder content; simple does not. Choosing wrongly produces a template that either ignores the builder or expects it where there is none.
Feed item templates
For the repeated item inside an archive's result loop.
- Assignment:
pom_post_archive_results_custom_layout, or the per-post-type equivalent. - Wrapper layout field:
pom_{post_type}_archive_results_layout, taking one ofdefault,default_masonry,only_image,horizontal_list,horizontal_list_thumbnail,horizontal_list_big,horizontal_list_creativeorno_wrapper.
Feed templates have a detail that matters: they report generated_files of template_php and template_php_hash, and the schema states plainly that the editable source is template_html, while those two are generated artifacts that agents should not edit.
Editing a generated artifact produces a change that is overwritten on the next regeneration, or a hash mismatch. Write template_html and let the rest follow.
Assignment is two decisions
A feed template needs both the template itself and the wrapper layout that surrounds the repeated items. They are separate settings, and a correct template inside the wrong wrapper produces a correct item rendered in an unexpected arrangement.
Read both before assigning.
The content model keys
Each type lists content_model_keys — the settings keys that carry its assignment, such as archive_template_id and archive_layout.
These matter when a custom post type is configured through pom_theme_configure_content_model rather than assigned individually. Knowing the key names lets a client set the assignment as part of creating the post type, in one coherent operation rather than several.
Using it well
Get the template schema for archive and tell me what it requires.
What layout IDs can a single template use, and how is it assigned?
Before building:
Read the template schema and available merge tags for this context, compose the markup, validate it, and show me the result before writing.
What it does not do
- It does not list existing templates. That is
pom_theme_list_html_templates. - It does not validate markup. That is
pom_validate_template_markup. - It does not assign anything. That is
pom_theme_assign_template. - It does not tell you which template is currently assigned. That is
pom_theme_get_template_assignments.