header-logo
Learn how to use Wix to build your site and business.
Design and manage your site using intuitive Wix features.
Manage subscriptions, plans and invoices.
Run your business and connect with members.
Learn to purchase, connect or transfer a domain to your site.
Get tools to grow your business and web presence.
Boost your visibility with SEO and marketing tools.
Get advanced features to help you work more efficiently.
Find solutions, learn about known issues or contact us.
placeholder-preview-image
Improve your skills with our courses and tutorials.
Get tips for web design, marketing and more.
Learn to increase organic site traffic from search engines.
Build a custom site using our full-stack platform.
Get matched with a specialist to help you reach your goals.
placeholder-preview-image
In this article
  • Adding filters to your dataset
  • Adding sort conditions to your dataset
  • FAQs

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

10 min
In this article
  • Adding filters to your dataset
  • Adding sort conditions to your dataset
  • FAQs
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
Studio Editor
  1. Go to the relevant page in your editor.
  2. Go to the relevant dataset settings:
    1. Click CMS  on the left. 
    2. Click Manage Page Connections.
    3. Click the More Actions icon  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. 

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
Studio Editor
  1. Go to the relevant page in your editor.
  2. Go to the relevant dataset settings:
    1. Click CMS  on the left. 
    2. Click Manage Page Connections.
    3. Click the More Actions icon  next to the relevant dataset and select Dataset settings
  3. Choose how you want to sort the items: 
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. 

Helpmate

Hello

Need a bit more guidance?
Summary of this article
Related articles
CMS: Setting Up a Custom Form Using Dropdown Input Elements

CMS: Hiding, Sorting, and Filtering Fields in Your Collection View

CMS: About Datasets

CMS: Using Input Elements to Allow Visitors to Filter Content
Unlock personalized helpLog in to get the most out of Helpmate.