Advanced display conditions allow you to control exactly where your Site Builder elements appear on your website. You can create sophisticated rules to show different headers, footers, or content blocks based on specific pages, post types, or user conditions.
Understanding Display Rules
Display rules work with two main approaches:
Entire Site: The builder element appears on every page of your website.
Specific Pages: The builder element appears only on pages that match your include rules, minus any pages that match your exclude rules.
Setting Up Display Conditions
Navigate to Site Builder in your WordPress admin and edit any builder element. In the Builder Settings panel, you’ll find the Display Rules section.
Basic Display Options
Display On Entire Site Select this option to show your builder element across your entire website. This is ideal for global headers and footers.
Display On Specific Pages Choose this option when you need precise control over where your builder element appears. This unlocks the include and exclude rules system.
Include Rules
Include rules define where your builder element should appear. You can combine multiple include rules – the element will show on any page that matches at least one rule.
Available Include Rule Types
Basic Pages
- Homepage
- 404 Page
- Search Results
- Blog Page
Post Types
- Posts
- Pages
- Products (if WooCommerce is active)
- Custom post types
Archives
- Author Archives
- Date Archives
- Category Archives
- Tag Archives
- Custom taxonomy archives
Specific Posts
- Individual posts by ID
- Individual pages by ID
- Specific products
User Conditions
- Logged in users
- Logged out users
- Specific user roles
Exclude Rules
Exclude rules define where your builder element should not appear, even if it matches an include rule. Exclude rules always override include rules.
Setting Up Complex Conditions
Example 1: Blog Header
- Include Rule: Posts
- Include Rule: Category Archives
- Include Rule: Tag Archives
- Exclude Rule: Specific post (ID: 123)
This displays a custom header on all blog-related pages except post ID 123.
Example 2: Shop Elements
- Include Rule: Products
- Include Rule: Product Categories
- Exclude Rule: Specific product category
This shows elements on all shop pages except one specific category.
Advanced Rule Combinations
You can create sophisticated display logic by combining multiple rules:
Multiple Include Rules
When you add multiple include rules, your builder element appears on pages matching any of the rules (OR logic).
Multiple Exclude Rules
When you add multiple exclude rules, your builder element is hidden from pages matching any of the exclude rules.
Priority System
Exclude rules always take precedence over include rules. If a page matches both an include rule and an exclude rule, the element will not display.
Dynamic Content Rules
For more advanced scenarios, you can use dynamic rules:
Archive Pages Target specific archive types like author pages, date-based archives, or custom taxonomy archives.
Conditional Logic Combine user status with page types. For example, show different headers for logged-in users on product pages.
Custom Post Types Create rules for custom post types created by plugins or themes.
Testing Display Conditions
After setting up your display rules:
- Save your builder element
- Visit the pages where it should appear
- Check pages where it should not appear
The Site Builder processes display rules in real-time, so changes take effect immediately after saving.
Performance Considerations
Complex display rules are cached to maintain site performance. The cache automatically clears when you update display rules or publish changes to builder elements.
For optimal performance, use the simplest rule structure that achieves your desired display logic.