Created
April 26, 2020 12:48
-
-
Save be-mohand/7a7930ee30c9eb060ccb321c7eaa20aa to your computer and use it in GitHub Desktop.
Display random listings on your Kreezalid homepage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Configure your homepage to load enough listings on your homepage. Let's say 100. | |
2. Update the homepage-listings snippets in the theme editor: | |
2.1. Add {% assign shuffled_listings = listings-section.listings | shuffle %} at the beginning of the snippet | |
2.2. Update the for loop to iterate on shuffled_listings instead of listings-section.listings. You can also limit the number of listing to display with the limit parameter: | |
{% for listing in shuffled_listings limit:8 %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment