Tell us what you are trying to do? Display a list of Repeating Custom Field values on a Page
Is there any documentation that you are following?
1) https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/
2) https://toolset.com/forums/topic/unable-to-show-repeating-custom-field-images-in-a-loop/
Is there a similar example that we can see?
What is the link to your site? I can provide in a private message.
I would like to show a list of Frequently Asked Questions (FAQs) in an accordion on a Page.
I don't want to create a Custom Post type for my questions and answers, because there are many of them and the questions and answers are fairly short. So instead, I created a Repeatable Custom Field which has two fields; Question and Answer. This was my client can easily edit and add/remove questions by editing just one area of the website (i.e. one page).
Since I will only have this list of FAQs on one single page of my site, the settings for this Repeatable Custom Field group are set to show the group on "Pages" and on my Content Template called "Our Process" which is only used for a single page on my site, also called "Our Process".
The part I am having trouble with is now how to display these FAQs on my page.
I created a View called "FAQs" and inserted that View into my "Our Process" Content Template. I then use that Content Template for my Our Process page only.
My "FAQs" View settings are shown in the attached screenshot, and the code in my loop is as follows:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-for-each field="wpcf-question-answer"]
<h2 >[types field='question'][/types]</h2>
<div >
[types field='answer'][/types]
</div>
[/wpv-for-each]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
[/wpv-no-items-found]
[wpv-layout-end]
But i get no results ๐
I am not so concerned with the accordion markupโI'll configure that later. For now I just want to at least achieve a list of the Questions and Answers appearing on my page.
What am I doing wrong?
Is it because I added a repeating Custom Fields group to a Page and not a particular Post type?
Is my [wpv-for-each] code wrong?
Thank you in advance for any help!