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
  • Filter datasets for clarity
  • Combine filters for precision
  • Sorting to reorder items
  • Sorting by multiple conditions
  • Sorting by a random order
  • FAQs

CMS: About Filtering and Sorting Live Site Content with Datasets

8 min
In this article
  • Filter datasets for clarity
  • Combine filters for precision
  • Sorting to reorder items
  • Sorting by multiple conditions
  • Sorting by a random order
  • FAQs
When you're managing CMS (Content Management System) content, it's important to keep things organized and make sure only the right items show up on your live site. You can do this by adding sorts and filters to your datasets. 

Keep in mind that filters and sorts you add to the dataset have no effect on how items appear in your CMS 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.

In this overview, explore how you can use these tools to ensure your collection items are presented exactly as you intend.

Filter datasets for clarity

Filtering your dataset gives you precise control over which collection items appear on the connected site elements. It's like using a magnifying glass to focus on specific details within a collection that contains vast amounts of content. If you ever need to change or remove a filter, you can do it easily from the dataset settings. Here's how adding a filter to your dataset works:

Select the field: After adding the filter in the dataset settings, choose which collection field you want to filter by. Think of it as setting the criteria for your search.

Define the condition: Next, specify the condition that your filter should apply. Depending on the type of field, you can use conditions like "is," "Starts with," "Greater than," or "Equals." The options are tailored to suit the field type.

Set the Value: Finally, decide on the value that your filter should match. This could be a specific category, a numerical threshold, or even the logged-in user.
Screenshot of adding a dataset filter in the Wix Editor.

Combine filters for precision

You may need more than one filter to get really specific. Imagine you're curating a list of recipes, and you want to showcase French recipes that are not too difficult to complete. You could add a filter that includes only French recipes, and another that excludes advanced recipes. Only items that match the criteria of both filters will display in the dataset's connected repeater, gallery, or other elements. 
Screenshot of adding multiple filters to a dataset in the Wix Editor.

Sorting to reorder items

Sorting helps you put your collection items in a specific, logical order. It's like arranging your books on a shelf in alphabetical or date order. Here's how sorting in your dataset settings works:

Choose which field to sort: Start by picking which collection field you want to sort your items by. This field determines the basis for arranging your items. It could be something like the name of a recipe or the date it was created.

Decide the order: Decide on the order in which you want your items to appear. The field type you sort by determines the available sorting options. You can sort alphabetically, numerically, oldest to newest, true fields first, and vice versa for each option.
Screenshot of adding a sort condition to a dataset.
Notes:
  • Sorts also determine the order in which items load for navigational buttons connected to the dataset. Learn about the dataset click actions you can assign to buttons and images. 
  • Dataset sorts override the order in any collections in which you've enabled the 'Mirror on Site' feature. However, dataset sorts do not affect the order in which items appear in your collection views.
Learn how to add sort conditions to datasets to control the order in which items display.

Sorting by multiple conditions

You can add multiple sort conditions for more advanced organization. With multiple sorts, the first condition is sorted first, followed by the second condition, and so on. This helps when you have multiple items that match your first sort condition and you want to further customize their order. 

For example, you may want to sort recipes by cuisine, then add another sort to keep them listed alphabetically by name within each cuisine group. To do so, add a sort for the cuisine field and a second sort for the recipe name. You can also add a collection field exclusively for sorting to create a custom order. 
Screenshot of adding multiple sorts to a dataset.

Sorting by a random order

You can use the Random order toggle in your dataset settings to shuffle the order that collection items appear on your site’s connected elements. This feature is helpful when you want each visitor to see a fresh or unpredictable arrangement of items, such as for featured products, testimonials, or galleries where variety increases engagement.

How the random order is applied depends on your page's caching settings:
  • If page caching is enabled: All visitors see the same randomized order until your collection data updates or the cache is refreshed. For example, if you launch a sale and want everyone to see a consistent set of randomly ordered products, caching ensures the order doesn’t change for each visitor.
  • If page caching is disabled: The order shuffles every time the page loads, so each visitor—or every page refresh—shows a different, unpredictable arrangement of items.

Enabling 'Random order' disables all other sorts and turns off pagination or navigation features. To go back to a regular sort order or re-enable pagination, simply disable the toggle. 
Screenshot of enabling random order sorting in the Studio Editor.

FAQs

Click below for answers to common questions about filtering and sorting live site content. 

Helpmate

Hello

Need a bit more guidance?
Summary of this article
Related articles
CMS: Controlling Live Site Item Visibility from Your Collection

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

CMS: Displaying Collection Content in a Repeater
Unlock personalized helpLog in to get the most out of Helpmate.