Skip Navigation

[Gelöst] Generate slide on my slider

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

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 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.

This topic contains 4 Antworten, has 3 Stimmen.

Last updated by Shane vor 2 Jahre, 9 Monate.

Assigned support staff: Shane.

Author
Artikel
#622167

Hi everyone,

I'm trying to add a custom post type in Toolset slider to make a portfolio. So I follow this ticket support https://toolset.com/forums/topic/how-to-display-the-pics-i-uploaded-as-a-slider/

Because it's exactly the same configuration than mine, (add different pictures and create a portfolio).

So I have follow the instruction, I have created my single template and add the code, download the flexslider fields (I have checked they're correctly uploaded).

But even with these nothing its happening and I don't know what is wrong, this is my page => hidden link

This is the code that I have added (I have changed the slug of my custom post type too)

[wpv-post-body view_template="None"]

<h2>Project images as a slider</h2>
<div class="flexslider">
<ul class="slides">
[wpv-for-each field="wpcf-medias"]

  • [types field='medias' alt='%%ALT%%' title='%%TITLE%%' size='goodlife-grid-8x8' align='none' resize='proportional' separator=', '][/types]
  • [/wpv-for-each]

    </div>

    And the JS on the JS editor of my Single template =>
    ( function( $ ) {
    $( document ).ready( function(){

    $('.flexslider').flexslider({
    animation: "slide"
    });

    });
    })( jQuery );

    Thank you for your help

    #622251

    Shane
    Supporter

    Languages: Englisch (English )

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

    Hi Marty,

    I took a look at this for you and it should be working now.

    The field name should've been wpcf-mediaz since this is what you used for the slug.

    Please let me know if this helps.
    Thanks,
    Shane

    #622508

    Oh sorry I tought that I have to used a different name for field and slug. Thanks a lot for your help!

    Have a nice day

    #1205795

    Hi, the link to download the plugin doesn't seem to work anymore. Would it be possible to have access to it? Thanks.

    (Download and install the plugin in the link below.
    hidden link)

    #1205803

    Shane
    Supporter

    Languages: Englisch (English )

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

    Hello,

    I can confirm that the link actually still works.

    You should see a download button. Please try clicking this.