[ADVANCED] How to create my own layout with Section Feed?
Section Feed provides a beautiful, customizable section that you can easily drag&drop to your home page. You may, however, want to display them in a completely different way. Section Feed allows you to directly retrieve the information about the Instagram media, so you can display them on your store. Please follow the instructions below:
- 1
- Install the application from the App Store, and make sure that you have properly linked your Instagram account to the app.
- 2
-
In your JavaScript code, use the following code to retrieve the latest media:
fetch(`https://d3ejra0xbg20rg.cloudfront.net/instagram/media?shop=${Shopify.shop}&resource=default`).then((response) => {
response.json().then((media) => {
// media is a json containing the data about the 18 latest media.
});
}); - 3
- You can now create your own HTML code and inject it into the DOM.