Kindly EditDocumentationTry the editor

Theme templates and display rules

Apply layouts to posts, archives, search results, and not-found pages without replacing the entire theme.

Watch the video

Chapters and transcript Captions are included.

Template kinds#

Theme templates use the private kindly_theme post type. Supported kinds cover single content, archives, search, and 404 pages. They are managed by users with theme-editing capability.

A template contains the layout; display rules decide where it applies. Draft rules stay separate until publication. Publishing a template can affect many visitor URLs, so review its conditions and a representative set of pages.

The Templates screen#

Since 0.9.17, Kindly Edit > Templates in WordPress has a section for the header and footer and one for theme templates. Each lists its items in a table: a small drawing, the name and kind, where it shows, and whether it is published, a draft or has unpublished changes. Add template in the Theme templates header (or Add a theme template under an empty list, 0.9.19 and later) opens a focused window: type a name, choose a kind from the drawings, then Create and edit; a new template starts with the rule its kind usually needs, as a draft. With more than five theme templates, a search box and Kind and Status filters appear above the list. Duplicate makes a draft copy, Move to the Trash asks first, and the Trash section at the end restores a template as a draft. Kindly Edit > Loops lists loop templates the same way, with the pages that use each one. Since 0.9.21, the video button beside the Templates title plays the Theme templates video in a window over the screen.

Rule priority#

The most specific matching rule wins. At equal specificity, the older template wins. Specific post IDs outrank the front page, URL rules, child and descendant relationships, term and author rules, page-template and post-type rules, archive rules, and broad all-content rules.

A page with its own-layout setting bypasses a matching template. If no template matches, the active theme continues to provide its normal output.

Dynamic content#

Bindings resolve against the requested post or archive, not the template record. Use the post-content element to place the page's own body within a single template. The renderer avoids recursively rendering that template inside itself.

Review before publishing#

Check one URL that should match and one that should not. For archives, test empty and multi-page results. For search, test a real query and no results. For 404, use a truly missing URL. Verify header and footer ownership so the layout does not duplicate shared site parts.

Use Page sources to understand which template or linked source supplies the visible page.

About this page

Documents Kindly Edit 0.9.16. Source: includes/theme-templates.php, assets/theme-settings.js. Theme choices and account permissions can change which controls appear.

Type a word or phrase to search the full documentation.