Menu Close

Template display conditions

Blocksify template display conditions control where a Dynamic Template appears and where WordPress keeps using another layout.

Where to find template display conditions

  1. Go to Blocksify → Dynamic Templates.
  2. Open a template or select Add New.
  3. Open the Dynamic Template document tab in the editor sidebar. Use Display on to include locations and Don’t display on to exclude them.
The Dynamic Template document tab shows empty Display on and Don't display on sections, each with a + (Add condition) button.

Click the + (Add condition) button beside either section. The condition chooser is one popover with visible Singular, Archive, and Special group headings.

You can add more than one condition to either section. Blocksify tests them as alternatives: one matching Display on condition is enough to include the location, while one matching Don’t display on condition is enough to remove it.

Singular conditions

Under the Singular heading, choose Single entry or Front page. Singular conditions match one post, page, or product being viewed on its own.

The Add condition popover lists Single entry and Front page under the Singular heading.
ConditionWhat it matchesBlocksify Free or Pro
Single entryAll entries of a selected post type, named entries, or entries assigned to selected taxonomy terms.Posts, pages, and WooCommerce products are free. Other post types and custom taxonomy values require Blocksify Pro.
Front pageThe site front page, whether it shows the latest posts or a static page.Free

Target entries or taxonomy terms

After choosing Single entry, set Post type, then use Apply to to define the target.

SettingDescription
All entriesMatches every entry of the selected post type.
Specific entriesOpens an entry picker. Choose one or more named posts, pages, or products.
In taxonomy termOpens Taxonomy and Terms pickers. It matches entries assigned to the selected terms.

When a selected term has child terms, entries in those child terms are included too. For example, choose the Interior design category to apply one Northstar Studio layout to that category and its subcategories.

A named entry is the narrowest singular target. Use it when one landing page or one product needs a dedicated layout, while all other entries continue using a broader template.

Archive conditions

Archive conditions match pages that collect entries, such as the blog, a category, an author page, or a product archive. The template can use a Content Loop to show the entries from the current archive.

The Add condition popover lists Post type archive, Taxonomy archive, Blog / Posts page, Author archive, Date archive, and the disabled Search results (Pro version) under the Archive heading.
ConditionWhat it matchesBlocksify Free or Pro
Post type archiveThe archive for a selected post type. With WooCommerce active, Products is available as a Free target.The WooCommerce product archive is free. Unsupported custom post types are dimmed in the next Post type selector and require Blocksify Pro.
Taxonomy archiveAll archive pages in a taxonomy, or only selected term archives such as Interior design.Categories, tags, product categories, and product tags are free. Custom taxonomies require Blocksify Pro.
Blog / Posts pageThe posts index, including a page assigned as the site’s posts page.Free
Author archiveAny author archive, optionally limited to a post type.Free for built-in post types; other post types require Blocksify Pro.
Date archiveYear, month, or day archives, optionally limited to a post type.Free for built-in post types; other post types require Blocksify Pro.
Search results (Pro version)The search results page, optionally limited to a post type.Visible but disabled in Blocksify Free; available with Blocksify Pro.

Narrow an archive condition

For Taxonomy archive, choose Taxonomy and leave Specific terms empty to match every term archive. Select terms to limit the template to those archive pages. The Editor preview — term picker shows a locked value such as Locked — Interior design when the first specific term determines the sample.

For Author archive, Date archive, or Search results (Pro version), use Within post type when the results should belong to one type. Its default, Any post type, keeps the condition broad.

Keep search separate

An archive condition never matches the search results page. Choose Search results (Pro version) separately; that condition requires Blocksify Pro.

Distinguish archive and single views

Post type archive and Taxonomy archive describe different views. The first covers an archive such as the shop page; the second covers term archives such as Product category: Hoodies. A single product page uses Single entry, not either archive condition.

Special conditions

The Special group covers a request that WordPress cannot match to published content.

The Add condition popover lists 404 (Not found) as the only choice under the Special heading.
ConditionWhat it matchesBlocksify Free or Pro
404 (Not found)The page shown when a requested URL cannot be found.Free

Include and exclude rules

Use inclusion rules to establish the template’s reach, then exclusions to remove exceptions. An exclusion always wins when the same page matches both sections.

The Dynamic Template document tab shows two Display on rules and one Don't display on exception, with Editor preview set to Small Workspaces, Serious Storage.
SettingDescription
Display onThe template may appear when at least one condition here matches.
Don’t display onThe template is removed when any condition here matches, even if an inclusion also matches.
No inclusion conditionThe template displays nowhere. Add at least one condition before expecting it on the front end.

For example, include Single entry for all posts, then exclude the News category. The template appears on other posts but not on posts assigned to News.

Conditions do not publish the template for you. Keep the template’s Status as Published when it is ready for visitors; a draft can retain its conditions without replacing a front-end layout.

Which template wins

When several published templates match, Blocksify chooses the one with the narrowest matching condition. A named entry or named term archive beats a broad rule; a post in a selected term beats a rule for all posts; and a rule for all posts beats a general blog rule.

Front-page rules are also treated as exact matches. Rules limited to one post type beat equivalent author, date, or search rules that allow any post type.

Follow the decision in practice

Suppose Northstar Studio has one template for all posts and another for posts in Interior design. An Interior design post uses the category-targeted template. If that post is excluded from it, Blocksify considers the remaining matching template instead.

If equally narrow rules still tie, the template created first wins. Avoid relying on that final tie-breaker: make the intended template narrower or add an exclusion so the choice is clear.

Plan broad rules before narrow ones

Start with the default layout for a whole content type, then add templates for meaningful exceptions. For a Northstar Studio blog, that might mean one all-posts template, one Interior design template, and one exact-entry campaign template.

This structure makes the outcome easy to predict: the exact entry wins first, the category-targeted template wins for other matching posts, and the all-posts template handles everything else. Exclusions remain useful when a location should return to the theme layout instead.

Was this helpful?

0

Updated