Skip Navigation

[Resolved] carousel using repeater field not working

This support ticket is created 3 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

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: Africa/Casablanca (GMT+01:00)

This topic contains 19 replies, has 2 voices.

Last updated by davidm-13 3 years, 11 months ago.

Assisted by: Jamal.

Author
Posts
#1916037

Thanks Jamal,
I understand.
How do I enter multiple instances in a csv file - does each instance appear in a separate column? What's the column header?
If I load the names as repeater image field with the full url would that be OK?
Thanks for your help.

New threads created by Jamal and linked to this one are listed below:

https://toolset.com/forums/topic/csv-import-repeater-field/

#1916305

For support rules, we are able to handle only one issue at a time. This helps us to bring you a better service and also helps other users to find all the information here exposed. For that reason I have created another ticket to handle how to import repeating fields from CSV file, I'll post my reply there.

#1921753

Hi Jamal,
I have this field:

plant images
<em><u>hidden link</u></em>, <em><u>hidden link</u></em>, <em><u>hidden link</u></em>

It's a single line text field. The text is a comma separated list of 3 images (with url). The 3 images exist in the media library, but I'm receiving "no image available". Is it possible to display the 3 images from the comma separated list in the single line text field.
This is the code I'm using with [wpv-for-each field="wpcf-plant-images"], which you suggested, but without success.

  <!-- carousel start -->  
	<div id="carouselExampleControls" class="pic carousel slide" data-ride="carousel">

    	<div class="carousel-inner">
          <ol>[wpv-for-each field="wpcf-plant-images"]<li>[wpv-post-field name="wpcf-plant-images"]</li>[/wpv-for-each]</ol>
          [wpv-for-each field="wpcf-plant-images" start="1" end="1"]
              <div class="carousel-item active">
                  <img src="[wpv-post-field name='wpcf-plant-images']" alt="No picture currently available">
   
              </div>
          [/wpv-for-each]
          [wpv-for-each field="wpcf-plant-images" start="2"]
              <div class="carousel-item">
                  <img src="[wpv-post-field name='wpcf-plant-images']" alt="No picture currently available">
              </div>
          [/wpv-for-each]
	    </div>
    <a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
        <span class="carousel-control-prev-icon" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
    </a>
    <a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
        <span class="carousel-control-next-icon" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
    </a>
  </div>
<!-- carousel end --> 

Thanks for your help
ps
If I have a single image to display this code works - so if I understand the wpv-for-each loop needs to take the images from the ol,li list and not from the wpv-post-field.

#1922853

Hello David,

Theoretically, you can display images, separated by a comma(,) inside a single-line text field. But that is not possible using the wpv-for-each. You need to build your own shortcode for that.
To use the wpv-for-each shortcode, you need to have a repeating field. Each image's name needs to be in its own instance and not on one instance and separated by comma(,). That's just not possible with Toolset shortcodes.

Conclusion: You CANNOT use wpv-for-each with a comma separated list.

All the best,
Jamal

#1933209

My issue is resolved now. Thank you!