LORD OF THE WIX

CMS: Adding Filters and Sorts to Datasets to Control Live Site Content

Lord Of The Wix · Oct 25, 2026

Add filters to CMS (Content Management System) datasets to only show certain items in their connected page elements. To choose the order in which the items appear, add sort conditions to the datasets. In both cases, you choose which collection fields to use for filtering or sorting the collection items.


Filters and sorts you add to the dataset have no effect on how items appear in your collection views. If you enable the ' Mirror on Site' feature to use the collection's order on your live site, sorts you add to the dataset override the order from your mirrored collection. You can only apply filters and sorts to datasets that are set to the 'Read' or 'Read & Write' mode.


Adding filters to your dataset


Add filters to datasets to choose which collection items appear in the connected elements (e.g. repeaters, galleries, input elements). Dataset filters do not affect the items that appear in your collection views. You can add filters to your collection views if you want to only see certain items in the collections, without affecting live site content.


For an overview of this process, check out our Ultimate CMS Guide video.


Wix Editor


  1. Go to the relevant page in your editor.

  2. Go to the relevant dataset settings:

    1. Click CMS

      CMS: Adding Filters and Sorts to Datasets to Control Live Site Content

      on the left.

    2. Click Manage Page Connections.

    3. Click the More Actions icon

      CMS: Adding Filters and Sorts to Datasets to Control Live Site Content

      next to the relevant dataset and select Dataset settings.

  3. Click + Add Filter under Filter.

  4. Click the Field drop-down and select the field you want to apply the filter to.

  5. Click the Condition drop-down and choose the condition you want to use in the filter. The options vary based on the field type that is being filtered.

  6. (If necessary) Select the Value source:

    • Manual entry: Enter the value you want to filter by in the Value field.

    • Another dataset: Select the dataset and field you want to filter from the relevant drop-downs.

  7. Click Add Filter.


A screenshot of adding a filter to a dataset in the Wix Editor.

  1. Publish your site when you are ready to make the changes go live.


Studio Editor


  1. Go to the relevant page in your editor.

  2. Go to the relevant dataset settings:

    1. Click an element that connects to the dataset you want to filter.

    2. Click the Connect to CMS icon

      CMS: Adding Filters and Sorts to Datasets to Control Live Site Content

      .

    3. Click Dataset Settings below the Choose a dataset drop-down.


Screenshot of going to the dataset settings in the Studio Editor.

  1. Click + Add Filter in the Filter section.

  2. Click the Field drop-down and select the field you want to apply the filter to.

  3. Click the Condition drop-down and choose the condition you want to use in the filter.

  4. (If necessary) Select the Value source:

    • Manual entry: Enter the value you want to filter in the Value field.

    • Another dataset: Select the dataset and field you want to filter from the relevant drop-downs.

    • URL Slug: (Datasets connected to Wix app collections only) You must select the Slug (Text) field to use this filter. Learn how to use the URL slug filter to display collection content on your Stores Product Page or Bookings Pages.

  5. Click Add Filter.


Screenshot of adding a dataset filter in the Studio Editor.

  1. Publish your site when you are ready to make the changes go live.


Adding sort conditions to your dataset


Datasets let you control the order in which collection items appear on your site’s connected elements (such as repeaters, galleries, and input elements. By default, items are sorted by creation date, with the newest first. You can add sort conditions to reorder content by specific fields, and these dataset sorts override any collection-level order if you’ve enabled the ‘ Mirror on Site ’ feature. Changes in your dataset do not affect how items appear within your collection view.


You can also use the Random order toggle in your dataset settings to shuffle the display order of items on your site. When enabled, all other sort conditions and pagination options (like next page or load more) are disabled. If site caching is enabled, all visitors see the same random order until you update your collection or the cache refreshes. If caching is disabled, the order changes each time the page loads. To restore your previous order or re-enable sorts and pagination, switch off the Random order toggle.


Note:


Random order sorting is only available for regular datasets connected to CMS collections you create. It doesn’t work with dynamic page datasets, external collections, app pages, or datasets set to appear on all pages.


Wix Editor


  1. Go to the relevant page in your editor.

  2. Go to the relevant dataset settings:

    1. Click CMS

      CMS: Adding Filters and Sorts to Datasets to Control Live Site Content

      on the left.

    2. Click Manage Page Connections.

    3. Click the More Actions icon

      CMS: Adding Filters and Sorts to Datasets to Control Live Site Content

      next to the relevant dataset and select Dataset settings.

  3. Choose how you want to sort the items:


Sort by field value

  1. Click Add new sort in the Sort section.

    Tip: To edit an existing sort condition, hover over it, click the More Actions icon

    CMS: Adding Filters and Sorts to Datasets to Control Live Site Content

    and select Edit.

  2. Click the Field drop-down and select the field you want to sort.

  3. Click the Order drop-down and choose the order in which you want the content to appear.

  4. Click Add Sort.

CMS: Adding Filters and Sorts to Datasets to Control Live Site Content

Sort by random order

  1. Click Other in the Sort section.

  2. Enable the Random order toggle.

CMS: Adding Filters and Sorts to Datasets to Control Live Site Content

Studio Editor


  1. Go to your editor.

  2. Go to the relevant dataset settings:

    1. Click CMS

      CMS: Adding Filters and Sorts to Datasets to Control Live Site Content

      on the left.

    2. Click Manage Page Connections.

    3. Click the More Actions icon

      CMS: Adding Filters and Sorts to Datasets to Control Live Site Content

      next to the relevant dataset and select Dataset settings.

  3. Choose how you want to sort the items:


Sort by field value

  1. Click Add new sort in the Sort section.

    Tip: To edit an existing sort condition, hover over it, click the More Actions icon

    CMS: Adding Filters and Sorts to Datasets to Control Live Site Content

    and select Edit.

  2. Click the Field drop-down and select the field you want to sort.

  3. Click the Order drop-down and choose the order in which you want the content to appear.

  4. Click Add Sort.

CMS: Adding Filters and Sorts to Datasets to Control Live Site Content

Sort by random order

  1. Click Other in the Sort section.

  2. Enable the Random order toggle.

CMS: Adding Filters and Sorts to Datasets to Control Live Site Content

Tip:


Publish your site when you are ready to make the changes go live.


FAQs


Click below for answers to common questions about filtering and sorting items.


Can I hide items in my collection to prevent them from appearing on the page?

Yes. In your collection settings, you can turn on the Enable drafts toggle. This adds a Status field to your collection where you can set individual items as 'Draft'. These items do not get read by the dataset, so they cannot appear on your live site.

You can set schedules that automatically change items between 'Published' and 'Draft' at specific dates and times. You can also save new items and edits as drafts until you publish them.

Learn more about:

Keep in mind that hiding, showing, or reordering fields in your collection view does not affect whether they can be connected to your page elements.


Can I control the order in which the items display on my live site from my collection?

Yes. You can enable the 'Mirror on Site' feature to apply the order of your collection view to connected site elements. Keep in mind:


How can I sort my items in a more logical way when using a mixture of letters and numbers in a 'Text' field type?

When you're using a 'Text' field type that contains both letters and numbers, the system applies an alphabetic sorting order. This means that 'Text' field values are sorted in an alphabetic sequence. For example:

While this is an expected behavior for an alphabetic sorting logic, you might prefer to sort these values in a numerical sequence.

To achieve this, you can use a 'Number' field type without any letters. By using a 'Number' field type, the system will sort the same set of numbers as follows:

This order aligns with a numerical sequence, offering a more intuitive understanding of your sorted data.

Learn how to:


What happens if no collection items match my dataset filter criteria?

If you add a filter to the dataset that returns no matching results from your collection, then the connected elements will not appear on the live site.

After applying a dataset filter, the total number of items that can appear on the page displays next to Filter in the dataset settings. A zero appears if no items match the filter criteria.

CMS: Adding Filters and Sorts to Datasets to Control Live Site Content

Does the dataset mode matter when filtering or sorting?

Yes. The dataset mode determines whether the dataset can read your collection content, write to your collection, or both. Your dataset needs to be in 'Read' or 'Read & Write' mode to read your collection items and apply filters or sort conditions.

If your dataset is set to 'Write' mode, it is meant to be used to connect user input elements to your collection for capturing visitor submissions. 'Write' mode datasets cannot read your collection content, so they cannot display the content or apply filters or sorts.

Learn more about dataset modes.


What does enabling the 'Random order' toggle do?

When you turn on the Random order toggle, your collection items are displayed in a randomized order within connected site elements like repeaters or galleries. The exact way the order is generated depends on your page's caching settings:

Learn how to turn on or off caching for your site pages .


This article is credited to the Wix team - https://support.wix.com/ and we thank them for that!

More PostsLet's Talk

Need A Professional Website?
Contact Us Today!