Skip to main content

Conditional Filters

Divi 5 only

This feature guide assumes Divi 5 (Filter Posts in the Visual Builder). For legacy Divi 4 module settings, see Modules → Divi 4 modules in the sidebar.

Overview

Conditional Filters allow you to show or hide entire filter items based on selections made in other filters. This creates dynamic, progressive filtering experiences where the available filters adapt automatically to user choices, keeping the interface clean and guiding users through complex filtering scenarios.

Instead of overwhelming users with all possible filters at once, you can reveal filters progressively as users make selections, or show specialized filters only when they're relevant to the current filtering context.

Conditional filters appearing and disappearing based on user selections

Why this matters

Conditional filters improve user experience by reducing interface complexity, preventing confusion from irrelevant options, and creating guided filtering workflows. They're essential for complex catalogs with many filter dimensions.


Two Types of Conditional Filters

Standard Conditional Filters

Display a secondary filter when specific conditions are met in a "master" filter.

Example: Show "Screen Size" filter only when user selects "Electronics" category.

Common uses:

  • Show attribute filters relevant to specific categories
  • Display price-based filters after initial selection
  • Reveal advanced filters after basic filtering

Parent/Child Category Filters

Automatically show subcategory filters based on parent category selection, with subcategories dynamically filtered to show only children of the selected parent.

Example: Select "Clothing" parent category, then see only clothing subcategories (Shirts, Pants, Dresses) in the child filter.

Common uses:

  • Hierarchical category navigation
  • Product taxonomy refinement
  • Multi-level filtering workflows
Configuration difference

Parent/child filters require a specific two-rule pattern ("does not equal" + "is not empty") to work correctly. Standard conditional filters use simpler logic.


Prerequisites

Before configuring conditional filters, ensure:

  • Filter Posts Module is added to your page with at least two filter items
  • Archive Loop Module is present on the same page
  • You understand the "master � conditional" relationship (the master filter controls when the conditional filter appears)
  • You have a plan for which filters depend on which
Logic ID format requirements

Logic IDs MUST be lowercase with no spaces or special characters. Using capital letters, spaces, or special characters will cause conditional filters to fail silently. Only use lowercase letters, numbers, and underscores.


How It Works

Conditional filters use a Logic ID system where each filter can be assigned a unique identifier. Other filters can then reference that ID to create conditional rules.

The Master-Conditional Relationship

  1. Master filter — assign a Logic ID (for example category). When the visitor makes a selection, that value is tied to the ID.
  2. Conditional filter — add rules that reference the master filter's Logic ID.
  3. When the rule conditions are met, the conditional filter appears; otherwise it stays hidden.

Rule Evaluation

When you enable conditional logic on a filter:

  1. Enable the conditional logic toggle
  2. Choose Relation (how multiple rules combine):
    • ALL - Every rule must be true (AND logic)
    • ANY - At least one rule must be true (OR logic)
  3. Define Rules that reference other filters' Logic IDs
  4. The filter only appears when rule conditions are satisfied

Diagram showing conditional logic evaluation flow


Configuration

Setting Up the Master Filter

First, configure the filter that will be referenced by others.

Located in: Filter Posts Module > Content Tab > Filter Item Settings > [Master Filter] > Advanced Features > Conditional Logic

Logic ID: Unique identifier for this filter

Assign a unique ID to this filter so other filters can reference it in their conditional rules.

Format Requirements (CRITICAL):

  • ONLY lowercase letters (a-z)
  • Numbers allowed (0-9)
  • Underscores allowed (_)
  • NO capital letters (A-Z)
  • NO spaces
  • NO special characters (-, !, @, #, etc.)

Good examples:

  • product_category
  • parent_category
  • price_range
  • color_filter
  • location

Bad examples (will NOT work):

  • Product_Category L (capital letters)
  • parent category L (space)
  • price-range L (hyphen)
  • color! L (special character)
Format is critical

Using incorrect Logic ID format is the #1 cause of conditional filters not working. Always use lowercase letters, numbers, and underscores only.

Logic Title: Admin-only descriptive name

Optional descriptive title for backend organization. This is not shown to visitors and is only used for your reference in the Divi Builder.

Example: "Main Category Filter" or "Parent Product Category"


Setting Up the Conditional Filter

Next, configure the filter that will appear/disappear based on conditions.

Located in: Filter Posts Module > Content Tab > Filter Item Settings > [Conditional Filter] > Advanced Features > Conditional Logic

Logic ID: Identifier for this filter (optional)

You can assign a Logic ID to this filter if other filters will reference it. Otherwise, it's optional.

If this filter will also control other filters, assign it a unique Logic ID following the same format rules.

Logic Title: Admin-only descriptive name (optional)

Optional descriptive title for backend organization.

Enable: Activate conditional logic

Toggle to ON to activate conditional logic for this filter.

When enabled: Filter only appears when the defined conditions are met.

When disabled: Filter always appears (standard behavior).

Relation: How multiple rules combine

When you define multiple rules, choose how they should be evaluated together.

Options:

ALL (AND Logic)

  • Every single rule must be true for the filter to appear
  • Use when you need multiple conditions satisfied simultaneously
  • Example: Show "Color" filter when Category = "Clothing" AND Type = "T-Shirt"

ANY (OR Logic)

  • At least one rule must be true for the filter to appear
  • Use when any of several conditions should trigger the filter
  • Example: Show "Brand" filter when Category = "Electronics" OR Category = "Appliances"
Choosing relation

Most conditional filters use ALL relation. Use ANY when you want the filter to appear in multiple different scenarios.

Rules: Define conditions for showing this filter

Each rule consists of three parts that work together to create a condition:

Field

Select which filter to evaluate by choosing its Logic ID from the dropdown.

The dropdown shows all filters that have Logic IDs assigned.

Example: If you select product_category, this rule will evaluate the value of that filter.

Operator

Choose how to compare the field's value:

Available operators:

  • Equals - Field value exactly matches the specified value

    • Use case: Show filter when Category equals "Electronics"
    • Example: category equals electronics
  • Not equals - Field value does NOT match the specified value

    • Use case: Show filter when Category is NOT "Clearance"
    • Example: category not equals clearance
  • Greater than - Field value is numerically greater

    • Use case: Show filter when Price is greater than 100
    • Example: price_range greater than 100
  • Less than - Field value is numerically less

    • Use case: Show filter when Price is less than 50
    • Example: price_range less than 50
  • Contains - Field value includes the specified text

    • Use case: Show filter when Category contains "Clothing"
    • Example: category contains cloth
  • Does not contain - Field value does NOT include the specified text

    • Use case: Show filter when Category does not contain "Sale"
    • Example: category does not contain sale
  • Is empty - No value is selected in the field

    • Use case: Hide filter until another filter has a selection
    • Example: parent_category is empty
    • Note: No value needed
  • Is not empty - Any value is selected in the field

    • Use case: Show filter after user makes any selection in another filter
    • Example: product_category is not empty
    • Note: No value needed

Value

Enter the value to compare against. This must match the actual slug or value from WordPress.

Important notes:

  • Case-sensitive - Must match exactly
  • Use slugs - For taxonomies, use the term slug, not the display name
  • Leave blank - For "Is empty" and "Is not empty" operators
  • Numeric values - For "Greater than" and "Less than" operators

Examples:

  • For category "Electronics", value might be: electronics
  • For price comparison: 100 or 500
  • For "Is not empty" operator: (leave blank)
Value matching

Values must match exactly (case-sensitive). If your rule isn't working, verify you're using the correct slug from WordPress, not the display name.


Common Scenarios

Scenario 1: Show Filter After Any Selection

Best for: Revealing secondary filters only after user engages with primary filter

Goal: Show "Product Color" filter only after user selects any category

Configuration:

Master Filter - Product Category:

  • Admin Filter Name: "Product Category"
  • What to Filter: Categories
  • Logic ID: product_category
  • Logic Title: "Main Product Category"

Conditional Filter - Product Color:

  • Admin Filter Name: "Product Color"
  • What to Filter: Product Attributes > Color
  • Logic ID: product_color (optional, only if other filters will reference it)
  • Enable: YES
  • Relation: ALL
  • Rule 1:
    • Field: product_category
    • Operator: Is not empty
    • Value: (leave blank)

Behavior:

  • Initial page load: Only category filter is visible
  • After selecting any category: Color filter appears
  • Keeps interface clean and progressive

Use case: Progressive disclosure in product catalogs where you want users to select a category first before seeing attribute filters.

Progressive filter reveal after selection


Scenario 2: Show Filter for Specific Value

Best for: Showing specialized filters only for specific categories or contexts

Goal: Show "Screen Size" filter only when "Electronics" category is selected

Configuration:

Master Filter - Product Category:

  • Admin Filter Name: "Product Category"
  • What to Filter: Categories
  • Logic ID: category
  • Logic Title: "Product Category"

Conditional Filter - Screen Size:

  • Admin Filter Name: "Screen Size"
  • What to Filter: Product Attributes > Screen Size
  • Enable: YES
  • Relation: ALL
  • Rule 1:
    • Field: category
    • Operator: Equals
    • Value: electronics

Behavior:

  • Screen Size filter only appears when Electronics category is active
  • Filter is completely hidden for other categories
  • Prevents irrelevant filters from cluttering the interface

Use case: Multi-category stores where different categories have different relevant attributes (screen size for electronics, fabric type for clothing, etc.).

Filter appearing only for specific category


Scenario 3: Parent/Child Category Filtering

Best for: Hierarchical category navigation with automatic subcategory filtering

Goal: Show subcategories that automatically filter to children of selected parent category

Configuration:

Master Filter - Parent Categories:

  • Admin Filter Name: "Main Categories"
  • What to Filter: Categories
  • Category Display Mode: Parent Categories Only
  • Logic ID: parent_category
  • Logic Title: "Parent Category Filter"

Conditional Filter - Subcategories:

  • Admin Filter Name: "Subcategories"
  • What to Filter: Categories
  • Category Display Mode: All Categories and Sub Categories
  • Logic ID: child_category (optional)
  • Enable: YES
  • Relation: ALL (critical!)
  • Rule 1:
    • Field: parent_category
    • Operator: Does not equal
    • Value: (leave blank)
  • Rule 2:
    • Field: parent_category
    • Operator: Is not empty
    • Value: (leave blank)

Behavior:

  • Initial page load: Only parent category filter visible
  • After selecting parent (e.g., "Clothing"): Subcategory filter appears showing ONLY children of Clothing (Shirts, Pants, Dresses)
  • Select different parent (e.g., "Electronics"): Subcategory filter updates to show ONLY children of Electronics (Computers, Phones, TVs)
  • Automatic filtering of subcategories based on parent selection

Why this works: The combination of "does not equal" (blank) AND "is not empty" ensures the subcategory filter only shows when a parent is selected, and Divi automatically filters the subcategories to show only children of that parent.

Use case: WooCommerce product catalogs with hierarchical category structures, blog archives with nested categories, any multi-level taxonomy navigation.

Parent category selection revealing filtered subcategories

Critical configuration

Parent/child filtering REQUIRES the "does not equal" + "is not empty" pattern with Relation = ALL. This is a specific pattern that triggers Divi's automatic subcategory filtering.


Scenario 4: Multiple Conditions with AND Logic

Best for: Showing filters only when multiple specific conditions are met

Goal: Show "Premium Features" filter only for "Electronics" category AND price over $500

Configuration:

Master Filters:

  • Category filter with Logic ID: category
  • Price Range filter with Logic ID: price_range

Conditional Filter - Premium Features:

  • Admin Filter Name: "Premium Features"
  • What to Filter: Product Attributes > Premium Features
  • Enable: YES
  • Relation: ALL
  • Rule 1:
    • Field: category
    • Operator: Equals
    • Value: electronics
  • Rule 2:
    • Field: price_range
    • Operator: Greater than
    • Value: 500

Behavior:

  • Filter ONLY appears when BOTH conditions are true
  • User must select Electronics category AND have price filter above $500
  • If either condition is not met, filter remains hidden

Use case: High-end product filtering, specialized attribute filters for specific product segments, complex multi-dimensional filtering.

Filter appearing only when multiple conditions met


Scenario 5: Multiple Conditions with OR Logic

Best for: Showing filters when any of several conditions are met

Goal: Show "Brand" filter when category is either "Electronics" OR "Appliances" OR "Tools"

Configuration:

Master Filter:

  • Category filter with Logic ID: category

Conditional Filter - Brand:

  • Admin Filter Name: "Brand"
  • What to Filter: Product Attributes > Brand
  • Enable: YES
  • Relation: ANY
  • Rule 1:
    • Field: category
    • Operator: Equals
    • Value: electronics
  • Rule 2:
    • Field: category
    • Operator: Equals
    • Value: appliances
  • Rule 3:
    • Field: category
    • Operator: Equals
    • Value: tools

Behavior:

  • Filter appears when ANY of the three categories is selected
  • Only one condition needs to be true
  • Provides flexibility for showing filters across multiple contexts

Use case: Showing brand filters for multiple product categories, attribute filters relevant to several different contexts, flexible conditional display.

Filter appearing for any of multiple categories


Scenario 6: Exclude Specific Values

Best for: Hiding filters for specific categories or exclusions

Goal: Show "Color" filter for all categories EXCEPT "Digital Products"

Configuration:

Master Filter:

  • Category filter with Logic ID: category

Conditional Filter - Color:

  • Admin Filter Name: "Color"
  • What to Filter: Product Attributes > Color
  • Enable: YES
  • Relation: ALL
  • Rule 1:
    • Field: category
    • Operator: Not equals
    • Value: digital-products
  • Rule 2:
    • Field: category
    • Operator: Is not empty
    • Value: (leave blank)

Behavior:

  • Color filter appears for all categories except Digital Products
  • Requires a category to be selected (not empty) but excludes specific value
  • Useful for hiding irrelevant filters

Use case: Excluding digital/downloadable products from physical attribute filters, hiding filters for clearance items, removing specialized filters for certain categories.

Filter hidden for specific excluded category


Best Practices

Logic ID Naming Conventions

Use descriptive, consistent naming for Logic IDs:

Good naming patterns:

  • parent_category / child_category
  • product_color / product_size
  • price_range / brand_filter
  • main_category / subcategory

Benefits:

  • Easy to remember which filter is which
  • Clear master-child relationships
  • Easier troubleshooting
  • Better maintenance

Setup Order

  1. Plan your filter hierarchy first

    • Sketch out which filters depend on which
    • Identify master filters vs conditional filters
    • Plan Logic ID names
  2. Configure master filters first

    • Add the filters that will be referenced
    • Assign Logic IDs
    • Save and test
  3. Configure conditional filters second

    • Add the dependent filters
    • Set up conditional logic rules
    • Reference master filters' Logic IDs

Troubleshooting

Conditional filter not appearing

Check Logic ID format:

The most common issue is incorrect Logic ID format. Verify:

  •  All lowercase letters
  •  No spaces
  •  No capital letters
  •  No special characters (except underscore)

Example: Change Product_Category to product_category


Filter appears when it shouldn't

Check rule values:

  • Verify you're using the correct slug, not display name
  • Check case sensitivity (values are case-sensitive)
  • Ensure operator matches your intent (equals vs contains)

Test: Use WordPress admin to verify the actual slug of your taxonomy term or custom field value.


Parent/child categories not working

Verify specific configuration:

Parent/child filtering requires exact configuration:

  • Relation = ALL
  • Rule 1: Master filter "Does not equal" (blank value)
  • Rule 2: Master filter "Is not empty" (blank value)
  • Master filter must use "Parent Categories Only" display mode
  • Child filter must use "All Categories and Sub Categories" display mode

Divi caching old Logic IDs

Symptom: You changed a Logic ID but conditional filters still reference the old ID.

Cause: Divi sometimes caches Logic ID references.

Solution:

  1. Open the conditional filter settings
  2. Disable the "Enable" toggle for Conditional Logic
  3. Save the module settings
  4. Update/publish the page
  5. Refresh the page in browser
  6. Re-open the conditional filter settings
  7. Enable the "Enable" toggle again
  8. Reconfigure rules if needed
  9. Save and update page

This forces Divi to reset the conditional logic IDs.


Changes not taking effect

Clear all caches:

  1. Divi cache:

    • Divi > Theme Options > Builder > Advanced > Static CSS File Generation > Clear
  2. WordPress cache:

    • Flush object cache if using caching plugins
  3. Browser cache:

    • Hard refresh (Ctrl+Shift+R or Cmd+Shift+R)
  4. CDN cache:

    • Purge CDN if applicable
  5. Try incognito/private browsing to test without cache


Symptom: When setting up rules, the Field dropdown is empty.

Cause: No filters have Logic IDs assigned.

Solution:

  1. Go to other filter items first
  2. Assign Logic IDs to the filters you want to reference
  3. Save those filters
  4. Return to your conditional filter
  5. The Field dropdown will now show available Logic IDs

Rule values not matching

Check these common issues:

Case sensitivity:

  • Value: Electronics electronics`
  • Use exact case from WordPress

Slug vs display name:

  • Display: "Digital Products"
  • Slug: digital-products
  • Use the slug in conditional rules

Numeric values:

  • Don't include currency symbols or formatting
  • Use: 100 not $100.00

Whitespace:

  • Remove leading/trailing spaces from values
  • Use: electronics not electronics

What's next?

Related Features:

Module Documentation:

Advanced Topics: