Liquid, JavaScript, themes, sales channels
I've built the following liquid for loop to retrieve & output data from a repeating advanced custom field in Shopify. The ACF namespace is faq, and contains heading and content data. My current loop is as follows:
<div class="feed-faqs"> {% if page.metafields.faq != blank %} {% assign faqs = page.metafields.faq %} {% for item in faqs %} {% assign i = forloop.index %} <div class="item item--{{ i }}"> {{ heading[i] }} {{ content[i] }} </div> {% endfor %} {% endif %} </div>
However, on the frontend, this loop returns the following:
<div class="feed-faqs"> <div class="item item--1"> </div> <div class="item item--2"> </div> </div>
Is what I'm trying to achieve (to output multiple values from a repeating ACF field) possible with this approach, and if so, where have I gone wrong in fetching the header & content data?
User | RANK |
---|---|
31 | |
31 | |
27 | |
17 | |
16 |
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By