Skip Navigation

[Resolved] No clue on how to set up this HTML into a repeatable field

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 7 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by jensB-2 7 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#559230

Hi folks,
I´m working on a custom theme, which uses a lot of custom fields. I´m using the latest version of Toolset Types (free version) and want to create a repeatable field.

This is the HTML code, which schould be written into the site.

<figure id="" class="">
hidden link">
<img alt="example4" src="hidden link">
<figcaption>The caption of the image</figcaption>

</figure>

Though it should be used to create an image gallery, this entire code has to be repeatable.

Custom fields would define:
- the URL in the <a> tag´s href
- the scr of the <img>
- the caption text in <figcaption>

I know how what inputs I have to use for the single fields, but I don´t know how I can set it up to be repeatable and what I have to write into the template file to output the above code in a repeatable way.

I hope I could make clear, what I´m wanting to do and hope you can help me with this.

Thanks in advance.

#559471

Dear Jens,

If you have a copy of Views plugin, you can setup it with shortcode [wpv-for-each]:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-for-each

If you don't have Views plugin, you will need to create a custom shortcode for it, for example:
https://toolset.com/forums/topic/image-field-type-featured-image-how-can-i-display-image-title-alt-desc/#post-100666

#559766

Hi,
thank you for your help.

I found this article in the documentation, with which I could assign the fields as repeating field group to my custom post type:
https://toolset.com/documentation/user-guides/creating-groups-of-repeating-fields-using-fields-tables/

But I don´t know, how I can output the data in my template file with PHP.

Is there any clear documentation about this for not advanced PHP users?

#559801

You can follow our document to setup your custom PHP codes:
https://toolset.com/documentation/customizing-sites-using-php/displaying-child-posts/

section "Displaying child post contents"

#560142

Fantastic.
This works like a charm.

Thank you very much for your help.

The forum ‘Types Community Support’ is closed to new topics and replies.