Skip to main content

AND vs OR taxonomy logic

Why logic choice matters

Your taxonomy logic defines whether each post in the loop must match all selected terms or any of them. Selecting the correct logic ensures that your layout displays the right content without returning empty results or overly broad lists.

Switch between AND and OR logic in the Loop accordion under Taxonomy filters Toggle between AND and OR logic in the taxonomy filter options.

How taxonomy logic works

When multiple taxonomy terms are applied inside the Loop accordion of the Content tab, Divi Loop Extender uses a logic toggle to define how those terms interact:

  • AND logic: Only posts or products that include all selected terms appear in the loop.
  • OR logic: Any post or product that includes at least one selected term is included.

This toggle directly affects how WordPress queries the database and can significantly change the number of results returned.

When to use AND

Use AND logic for tightly filtered or compound conditions:

  • Niche collections that must meet several term requirements, such as posts tagged Featured and Video.
  • Member dashboards that require multiple role or access category matches.
  • Events that need to match several categories like Conference and Day 1.

When to use OR

Use OR logic to broaden your loop:

  • Category hubs combining content from multiple related topics.
  • Marketing grids displaying posts tagged with Sale, Offer, or Promotion.
  • WooCommerce loops listing products from any of several sale or seasonal categories.