Skip Navigation

[Resolved] Create View or template with small sliders from post

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user had some repeated image fields and wanted to create a slider using these images.

Solution:

I managed to create a flexslider plugin that should be able to help your.

Download and install the plugin in the link below.
https://drive.google.com/file/d/1CFU2_oBqe9PJBks8cT1VqMND8-ytDdVE/view?usp=sharing

Then create a content template for your post and add the following.

<div class="flexslider">
  <ul class="slides">
   [wpv-for-each field="wpcf-image_1"]
  <li>[types field="image_1" size="medium" align="none" resize="pad" padding_color="#FFF"][/types]</li>
  [/wpv-for-each]
  </ul>
</div>

After doing this then you will need to add the script for it to work.

Add this to the js section of the content template.

jQuery(window).load(function() {
   jQuery('.flexslider').flexslider();
 });
This support ticket is created 6 years, 6 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Author
Posts
#901576

Hi,
I was playing with Toolset fiew days - and today i decided to to buy
I'm very new with Toolset but i worked a little bit with your docs

Tell us what you are trying to do?
I want to create directory for ads - specialised in weddings
I created fiew things but i need help with slider

I like this one
hidden link
and i think this is exacly what i want to make.

Every photographer has its own gallery (done that) - and from this gallery are 5 images selected (i think randomly) to display as a images on listing pages

for now this is my poor version
hidden link

As i dont understand toolset as much as i probably should i think i need step-by-step setup help

Is there any documentation that you are following?

Is there a similar example that we can see?
hidden link
What is the link to your site?

#901681

OK I have found in docs ready modules - and even found interesting slider

From here: https://toolset.com/home/module-manager/?category=slider-2
i have took Responsive Slider module

So made some progress and slider works.

Now i need to limit number of images to take to slider to 5 because in gallery there will be probably about 50-60 images.

I need to display in slider max 5 of them

#901708

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Magdalena,

Thank you for contacting our support forum.

Could you let me know if the slider images are stored as repeated fields on that CPT?

Because we could make use of the flex slider to do your slider.

Please let me know.
Thanks,
Shane

#901713

Yes those are repeated fields.
But i have already done slider and it works great.

Only thing that i have to do is to limit number of slides in it to max 5.

So when i will have 50 imges in repeated fields - slider should show only 5 of them

#901757

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Magdalena,

SInce this is done using repeated fields. Could you send me the code that you are using to do this.

This way I can get an understand of how its built in order to advise how to limit it to 5 images.

Thanks
Shane

#901843

DONE 🙂

Post has 3 photos - limited to 2 worked.
hidden link

I have used

[wpv-for-each field="wpcf-zdjecie_glowne" end="2"] end 2 gave me an answer