Conditional Theme Templates (Single, Archive, 404) & SSR Tokens
Appearance → Theme Layouts (/d-admin/theme-layouts) brings full Elementor Pro / Block Theme template routing to Daypress—separating structured content in SQLite from reusable presentation layouts.
Template slots & include/exclude display conditions
Each template in /d-admin/theme-layouts combines a template_type, an integer priority (higher wins when multiple templates match), and include / exclude condition rules:
template_type | Target Routes | Example Display Conditions |
|---|---|---|
single_post | Blog posts & Custom Post Type singles | Include post_type:case_study (priority 20); fallback all_posts (priority 10). |
single_page | Standard static pages | Include all_pages, Exclude front_page or specific post IDs. |
archive | Blog index, CPT archives, categories, tags, authors | Include archive:portfolio or taxonomy:category. |
error_404 | Unmatched 404 Not Found routes | Include entire_site (with embedded SearchForm recovery). |

Appearance -> Theme Layouts (/d-admin/theme-layouts) routes Single, Archive, and 404 templates by condition and priority.
Dynamic SSR token reference
Place any token below inside a Heading, Text, Button URL, or Image source inside your template; SsrInjector hydrates it per request on the server:
| Token | Resolved SSR Output |
|---|---|
{{post.title}} / {{post.excerpt}} | Escaped post title or summary excerpt. |
{{post.content}} | Full rendered post body HTML (inject inside your article column container). |
{{post.date}} / {{post.modified}} | Formatted publication or last-modified date (uses date_format option). |
{{post.featured_image}} | Resolved /uploads/... URL of the post's featured media attachment. |
{{author.name}} / {{author.bio}} | Display name and biographical info of the post author. |
{{acf.<field_name>}} | Value of any Structured Field (e.g., {{acf.client_name}} or {{acf.headline_metric}}). |
{{site.title}} / {{site.url}} | Global site name (blogname) and canonical base URL. |
Full-Canvas Override Rule: When an individual post or CPT item has its own top-level DayStudio
Section layout saved in layout_json, Daypress renders that page's bespoke canvas directly instead of wrapping it inside a single_post prose template.Saving a conditional CPT template via MCP
// MCP: daypress_save_template
{
"name": "Case Study Single Layout",
"template_type": "single_post",
"status": "publish",
"priority": 20,
"conditions": [
{"rule_type": "include", "target": "post_type:case_study"}
],
"layout_json": "{...DaypressLayout AST using {{post.title}}, {{acf.headline_metric}}, {{post.content}}...}"
}