Skip to main content

Query, sorting, and archives

Divi 5 only

Query fields are on Archive Loop. Filters narrow the result set; the loop query defines the starting pool.

Base query vs filters

Archive Loop sets post type, status, include/exclude IDs, taxonomies, and relationships. Filter Posts applies visitor selections on top of that query via Ajax.

Align post type and taxonomies on both modules before tuning advanced query options.

Sorting

Configure primary Sort order and optional Secondary sort for stable ordering (for example date, then title). Filter changes should not reset sort unless you change sort settings in the module.

Sticky posts and specials

Control whether sticky posts float to the top or follow normal order. Test with filters active—sticky behavior should match your editorial expectations on archive templates.

Relationships and meta

Relationship and meta query options restrict loops to related content (for example products in a series or posts linked via ACF). Pair relationship loops with filter items that expose the same fields visitors expect to narrow.

Archive context

On native archive templates, the loop can respect Archive only behavior so the base query follows the current category, tag, or author URL. Custom pages need explicit post type and taxonomy defaults on Archive Loop.

Group by taxonomy

When enabled, Group by taxonomy clusters results under term headings—useful for FAQs, specs, or regional directories. Confirm filter items still make sense when groups are visible.

What's next