Build a single template
A single template replaces the body layout for an individual post or POM custom post type item.
Before you begin
Prepare one published item with representative content, a featured image and any custom fields required by the design. Note the exact custom-field keys used by merge tags.
Create the template
- Open Settings → POM Theme → Templates → HMTL templates → Single HTML templates.
- Select Add template.
- Enter a recognizable Template name.
- Add the article structure in Template HTML.
- Insert single merge tags and conditional blocks.
- Select any required Custom CSS Stylesheets and Custom JS Scripts.
- Save the theme settings.
Example:
<article class="event">
<header>
<h1>{{title}}</h1>
{{if meta="event_date" value="not_empty"}}
{{meta name="event_date" type="date" prepend=%%Date: %%}}
{{/if}}
</header>
{{featured_image image_size="large"}}
<div class="event-content">{{content}}</div>
{{posts_nav}}
</article>
Assign the template
For WordPress posts:
- Open Settings → POM Theme → Templates → Blog → Post single.
- Select the template under Layout style.
- Save and open a post.
For a POM custom post type:
- Open Settings → POM Theme → Content model → Post Types.
- Edit the relevant post type.
- Select the template under Single layout.
- Save and open an item of that type.
Expected result
The selected template renders the current item's data. Shortcodes inside the template and the main content are processed on the public page. A password-protected item continues to show the password form until access is granted.
Verify the result
- Test a populated item and one with optional fields missing.
- Check the featured image at the requested WordPress size.
- Confirm dates use the site's configured date and time formats.
- Verify previous/next navigation if
{{posts_nav}}is present. - Open a password-protected item if the post type uses that feature.