Skip to main content

Sorting and orderby

Overview

Divi Loop Extender adds sorting capabilities that are not available in the native Divi 5 Loop controls. Use these additions to sort by ACF fields (including Date Picker), custom meta keys, WooCommerce signals, or to stack multiple order rules.

Order By options added by Loop Extender

Where to find it

  1. Open your page in the Divi 5 builder.
  2. Select the container using the Loop Element.
  3. Open the Loop tab.
  4. Locate Order by. All options documented here are provided by Loop Extender.

This page documents Divi Loop Extender additions only. Native Divi 5 order options (such as Publish Date, Title, ID, Random, etc.) are intentionally omitted.

Divi Loop Extender order sources

Use the Order by dropdown to choose one of the following provided options:

  • ACF field
    Sort by the value stored in a specific ACF field attached to the looped posts.

  • ACF date picker
    Sort chronologically by an ACF Date Picker field (supports ascending for upcoming and descending for most recent).

  • Custom field
    Sort by any meta key saved on the post (works with ACF, Pods, or custom code) using the key you provide.

  • Multiple order by
    Apply stacked sorting. Define a primary and a secondary rule (e.g., “Menu order, then Title”).

  • WooCommerce: Newest / Best selling / Highest rated / Most reviewed / Price low to high / Price high to low / % discount
    Use commerce-aware signals when looping products.

Settings (Loop Extender only)

SettingWhen it appearsWhat it doesNotes
OrderAlwaysSets direction for the current rule.Ascending or Descending.
ACF fieldOrder by = ACF fieldSelect the ACF field used for sorting.The field must exist on all items for predictable results.
ACF field typeOrder by = ACF fieldTells Loop Extender how to compare values.Choose Text/String or Number to match field data.
ACF date picker fieldOrder by = ACF date pickerSelect the ACF Date Picker to use.Ensure consistent date format across items.
Meta keyOrder by = Custom fieldEnter the exact meta key name to sort by.Example: featured_priority.
Sort typeOrder by = Custom fieldChoose how values are compared.Alphabetical or Numeric.
Order by field 1Order by = Multiple order byPrimary rule.Supports native and Loop Extender sources.
Direction 1Order by = Multiple order byDirection for primary rule.Ascending or Descending.
Order by field 2Order by = Multiple order bySecondary tiebreak rule.Optional but recommended for stable ordering.

Order By options added by Loop Extender

Examples

Sort posts by an ACF number field (highest first)

  1. In Loop > Order by, choose ACF field.
  2. Set ACF field to your field (e.g., rating score).
  3. Set ACF field type to Number.
  4. Set Order to Descending.

Upcoming events by ACF date picker

  1. In Loop > Order by, choose ACF date picker.
  2. Select your date field (e.g., event start date).
  3. Set Order to Ascending to show the soonest event first.

Custom meta key with numeric sort

  1. In Loop > Order by, choose Custom field.
  2. Enter Meta key priority score.
  3. Set Sort type to Numeric and Order to Descending.

Multi-criteria: manual order, then title

  1. In Loop > Order by, choose Multiple order by.
  2. Set Order by field 1 to Menu order and Direction 1 to Ascending.
  3. Set Order by field 2 to Title (Ascending) for stable alphabetical ties.