top of page

How to Display Items on Your Website in the Same Order as a Wix CMS Collection

How to Display Items on Your Website in the Same Order as a Wix CMS Collection

The Wix Wiz

May 14, 2024

9

Tags:

API, Content, CMS, Our Practice

Introduction

Displaying items in a consistent and organized manner is crucial for enhancing user experience and improving website navigation. For those using WIX, ensuring that your website displays items in the same order as your WIX CMS collection can make a significant difference.


In this detailed guide, we will explore various methods and best practices to achieve this goal seamlessly.


Understanding WIX CMS Collections

WIX CMS collections allow you to manage and organize your content efficiently. A CMS collection in WIX can include various content types, such as blog posts, products, portfolio items, and more. The order of these items can be customized based on your preferences, ensuring that your website visitors experience a consistent and logical content flow.


Benefits of Maintaining Order Consistency

  • Enhanced User Experience: A predictable order makes navigation intuitive for users.

  • Improved SEO Performance: Well-structured content can lead to better search engine rankings.

  • Streamlined Content Management: Easier to manage and update content within your WIX CMS.


Methods to Display WIX CMS Collection Order on Your Website


1. Utilize WIX's Built-In Features

WIX provides several built-in features that allow you to display items in the same order as your CMS collection. These features include:

  • Dynamic Pages: Create dynamic pages that automatically display items from your CMS collection in the specified order.

  • Repeater Elements: Use repeater elements to display lists of items in a particular order, such as by date, category, or custom sorting.


Steps to Use Dynamic Pages:

  1. Create a Collection: In the WIX CMS, create a new collection and add your items.

  2. Design a Dynamic Page: Use the dynamic page feature to design a page that connects to your collection.

  3. Set Display Order: Configure the display order within the dynamic page settings to match your collection order.


2. Implement Custom Code with Velo by WIX

For more advanced customization, you can use Velo by WIX (formerly Corvid), a development platform that allows you to add custom functionality to your WIX site. By using Velo, you can write code to fetch and display items in the desired order.


Example Using Velo:

$w.onReady(function () {

// Fetch data from the collection

wixData.query("YourCollectionName")

.ascending("orderField")

.find()

.then((results) => {

// Code to display items in the specified order

results.items.forEach((item) => {

// Display logic here

});

})

.catch((err) => {

console.log(err);

});

});



3. Use WIX App Market Plugins

WIX's App Market offers various plugins that can help you manage and display your CMS collections in a specific order. These plugins often provide user-friendly interfaces and additional customization options.


Popular Plugins:

  • Wix Stores: Ideal for displaying products in a specific order.

  • Wix Blog: Perfect for organizing blog posts chronologically or by custom order.

  • Content Manager Apps: Various apps are available for managing and displaying other types of content.


4. Leverage WIX APIs

WIX APIs offer another method to fetch and display CMS collections in the desired order. By making API calls, you can dynamically retrieve and display data on your website.


Example Using Fetch API:

fetch('https://your-wix-api-endpoint.com/collection')

.then(response => response.json())

.then(data => {

data.items.sort((a, b) => a.order - b.order);

data.items.forEach(item => {

// Code to display item

});

})

.catch(error => console.log('Error:', error));


5. Optimize for Mobile Devices

Ensure that the order of items remains consistent across all devices, including mobile phones and tablets. This involves testing your site on various screen sizes and orientations to ensure a seamless user experience.

Best Practices for Displaying WIX CMS Collections

Maintain Consistency Across Devices

Test the display of your CMS collections on different devices to ensure a consistent user experience. Use responsive design principles to adapt the layout to various screen sizes


Regularly Update Your WIX Site

Keep your WIX site and any associated plugins or custom code up to date. Regular updates ensure compatibility and leverage new features and security improvements.


Optimize Performance

Ensure fast load times by optimizing your code and using caching strategies. Efficient performance is crucial for maintaining a positive user experience and improving SEO rankings.


User-Friendly Interface

Design an intuitive interface that allows users to easily navigate through your content. Use clear headings, well-defined categories, and effective search functionality to enhance the user experience.


SEO Considerations

Optimize your content for search engines by incorporating relevant keywords, meta descriptions, and structured data. A well-organized CMS collection improves your site's crawlability and search engine performance.


Conclusion

Displaying items on your WIX website in the same order as your CMS collection is essential for maintaining consistency, enhancing user experience, and improving SEO performance. By utilizing WIX's built-in features, implementing custom code with Velo, leveraging plugins, and following best practices, you can achieve a seamless and organized display of your content.

Related videos

Wix ideas.jpg
VBlog - Video Blog
Jun 28, 2024

60

Figma to Wix Studio Plugin Explained

Wix ideas.jpg
The Wix Wiz
Jul 1, 2024

27

Does the Figma to Wix Studio plugin work

Wix ideas.jpg
The Wx Wiz
Jun 18, 2024

25

How to Connect ANY Payment Provider

bottom of page