Sorting Widget

Sorting Widget Settings

Give visitors a dropdown to reorder the results of a post widget. You build the dropdown from a list of sorting options.

Options:

SettingPurposeDetails
Post Widget TargetChoose the post widget the sorting dropdown controls.Pick a Post, Loop Grid, Loop Carousel, Posts or Elementor V4 Loop widget from the dropdown. It lists the widgets present on the page. If you leave it empty and the page contains only one post widget, the sorting widget connects to it automatically. If it can’t find a target, it shows a warning in the browser console. The dropdown is hidden while a Custom Target Selector is filled in.
Custom Target SelectorTarget a widget by CSS ID or class instead of using the dropdown.Use this for advanced setups, or to drive several widgets at once. Separate multiple selectors with commas, for example #news-grid, .events-grid. The Post Widget Target dropdown is hidden while this field has a value.
Post Type to FilterSelect the type of content to sort.Choose a post type, or Targeted Widget to use the post type of the target widget. To combine the sorting widget with Filter and Search Bar widgets, point them all at the same target. When a Filter widget is used with the sorting widget, the Filter widget’s post type takes priority.
Sorting OptionsBuild the list of choices visitors can pick from.Each entry in the list becomes one item in the dropdown, with its own title, criteria and direction. Add, remove and reorder entries as needed. The first entry is selected when the page loads. Defaults: Sort by default, Sort by title: alphabetical (ASC), Sort by title: reverse (DESC), By date: newest first (DESC), By date: oldest first (ASC).
TitleSet the label of the dropdown item.This is the text visitors see. If you leave it empty, a label is generated from the criteria and direction, such as “Sort by: title (ASC)”. This is a setting inside each Sorting Options entry.
Sort ByChoose the sorting criteria for this entry.Select from Default, Date, Last Modified, Random, Comment Count, Title, Post ID, Author, Menu Order, Relevance, Custom Field, or Custom Field (Numeric). Default keeps the order defined in the target widget. Relevance orders results by how well they match a search, so it works together with the Search Bar widget. Custom Field sorts a text or date meta value alphabetically, and Custom Field (Numeric) sorts by number.
Field KeySpecify the meta key to sort by.Available when “Sort By” is set to Custom Field or Custom Field (Numeric). Enter the meta key, for example _price for WooCommerce prices. Use the key in lowercase, exactly as it is stored.
OrderChoose the sorting direction for this entry.Select ASC (ascending, A–Z or lowest first) or DESC (descending, Z–A or highest first). Default: ASC.
Elementor Template IDHelp the sorting widget find the target widget inside an Elementor Pro template.Leave empty for automatic detection. If sorting returns an error 500 inside a template, enter the ID of the template that contains the target widget.

How sorting behaves:

  • Results reorder as soon as the visitor picks an option, without reloading the page.
  • The Filter widget’s Reset button sets the dropdown back to its first entry.
  • Sorting works together with filters and search: the visitor’s filtered and searched results are sorted, not the whole list.

Tips:

  • Put your preferred default order first, since it is the option selected on load.
  • Create two entries for the same field to offer both directions, such as “Price: low to high” (ASC) and “Price: high to low” (DESC).
  • Use Custom Field (Numeric) for numbers like price or rating. Plain Custom Field sorts them as text, so 100 comes before 20.